All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joseph Qi <joseph.qi@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2: improve code readability
Date: Mon, 3 Nov 2014 13:01:16 +0800	[thread overview]
Message-ID: <54570C1C.9080508@huawei.com> (raw)
In-Reply-To: <1414758561-30022-1-git-send-email-sudipm.mukherjee@gmail.com>

You are right. Actually Andrew has already fixed this in mm tree.
Thanks.

On 2014/10/31 20:29, Sudip Mukherjee wrote:
> 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 <sudip@vectorindia.org>
> ---
> 
> 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 */
> 

      reply	other threads:[~2014-11-03  5:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 12:29 [Ocfs2-devel] [PATCH] ocfs2: improve code readability Sudip Mukherjee
2014-10-31 12:29 ` Sudip Mukherjee
2014-11-03  5:01 ` Joseph Qi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54570C1C.9080508@huawei.com \
    --to=joseph.qi@huawei.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.