From patchwork Fri Oct 31 12:29:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 5205451 Return-Path: X-Original-To: patchwork-ocfs2-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 544E2C11AC for ; Fri, 31 Oct 2014 15:43:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F36B42013A for ; Fri, 31 Oct 2014 15:43:25 +0000 (UTC) Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4796120120 for ; Fri, 31 Oct 2014 15:43:24 +0000 (UTC) Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s9VFh3ej023489 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 31 Oct 2014 15:43:04 GMT Received: from oss.oracle.com (oss-external.oracle.com [137.254.96.51]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s9VFgwAE022264 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 31 Oct 2014 15:42:58 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1XkELq-0002fy-1a; Fri, 31 Oct 2014 08:42:58 -0700 Received: from acsinet21.oracle.com ([141.146.126.237]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1XkBKg-0005Zs-Mn for ocfs2-devel@oss.oracle.com; Fri, 31 Oct 2014 05:29:35 -0700 Received: from userp1020.oracle.com (userp1020.oracle.com [156.151.31.79]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s9VCTW6Z011338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 31 Oct 2014 12:29:33 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by userp1020.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s9VCTWrU024467 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 31 Oct 2014 12:29:32 GMT Authentication-Results: userp1020.oracle.com; dkim=pass reason="2048-bit key" header.d=gmail.com header.i=@gmail.com header.b=se9ZaX0W Received: from pps.filterd (userp2030.oracle.com [127.0.0.1]) by userp2030.oracle.com (8.14.7/8.14.7) with SMTP id s9VCTBkn032729 for ; Fri, 31 Oct 2014 12:29:32 GMT Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by userp2030.oracle.com with ESMTP id 1qc24ge5hc-1 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 31 Oct 2014 12:29:31 +0000 Received: by mail-pa0-f41.google.com with SMTP id rd3so7646220pab.28 for ; Fri, 31 Oct 2014 05:29:31 -0700 (PDT) X-Received: by 10.66.159.33 with SMTP id wz1mr24046800pab.58.1414758571003; Fri, 31 Oct 2014 05:29:31 -0700 (PDT) Received: from localhost.localdomain ([122.169.160.196]) by mx.google.com with ESMTPSA id gy10sm6965154pbd.67.2014.10.31.05.29.28 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 05:29:30 -0700 (PDT) From: Sudip Mukherjee To: Mark Fasheh , Joel Becker Date: Fri, 31 Oct 2014 17:59:21 +0530 Message-Id: <1414758561-30022-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 X-ServerName: mail-pa0-f41.google.com X-Proofpoint-Virus-Version: vendor=nai engine=5600 definitions=7607 signatures=670566 X-Proofpoint-Spam-Details: rule=spam policy=default score=96 spamscore=96 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1410310119 X-Mailman-Approved-At: Fri, 31 Oct 2014 08:42:56 -0700 Cc: Sudip Mukherjee , ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org Subject: [Ocfs2-devel] [PATCH] ocfs2: improve code readability X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP code was getting confusing as the priority of both the operators ! and & are same. this change is done to just to improve the readability of the code. Signed-off-by: Sudip Mukherjee --- hi, i hope this is the way Weiwei Wang has thought of the logic when giving that BUG_ON, please discard this patch if this assumption was worng. fs/ocfs2/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 62620ab..1a05574 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -2764,7 +2764,7 @@ int ocfs2_del_inode_from_orphan(struct ocfs2_super *osb, goto bail_unlock_orphan; } - BUG_ON(!di->i_flags & cpu_to_le32(OCFS2_DIO_ORPHANED_FL)); + BUG_ON(!(di->i_flags & cpu_to_le32(OCFS2_DIO_ORPHANED_FL))); /* Only delete entry if OCFS2_ORPHANED_FL not set, or * there are two entries added */