[PATCH] fs/buffer.c: change buffer_busy() to use logical-OR expression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Convert bitwise-OR operator to logical-OR in favor of short-circuit
evaluation. The end result would be same.

Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxx>
---
 fs/buffer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index f5755f7..4362e77 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -3069,7 +3069,7 @@ EXPORT_SYMBOL(sync_dirty_buffer);
  */
 static inline int buffer_busy(struct buffer_head *bh)
 {
-	return atomic_read(&bh->b_count) |
+	return atomic_read(&bh->b_count) ||
 		(bh->b_state & ((1 << BH_Dirty) | (1 << BH_Lock)));
 }
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux