* [Ocfs2-devel] [PATCH] ocfs2: improve code readability
@ 2014-10-31 12:29 ` Sudip Mukherjee
0 siblings, 0 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2014-10-31 12:29 UTC (permalink / raw)
To: Mark Fasheh, Joel Becker
Cc: Sudip Mukherjee, ocfs2-devel, linux-kernel, Weiwei Wang
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 */
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ocfs2: improve code readability
@ 2014-10-31 12:29 ` Sudip Mukherjee
0 siblings, 0 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2014-10-31 12:29 UTC (permalink / raw)
To: Mark Fasheh, Joel Becker
Cc: Sudip Mukherjee, ocfs2-devel, linux-kernel, Weiwei Wang
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 */
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Ocfs2-devel] [PATCH] ocfs2: improve code readability
2014-10-31 12:29 ` Sudip Mukherjee
(?)
@ 2014-11-03 5:01 ` Joseph Qi
-1 siblings, 0 replies; 3+ messages in thread
From: Joseph Qi @ 2014-11-03 5:01 UTC (permalink / raw)
To: ocfs2-devel
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 */
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-03 5:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [Ocfs2-devel] " Joseph Qi
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.