From: Namhyung Kim <namhyung@gmail.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] fs/buffer.c: change buffer_busy() to use logical-OR expression
Date: Sun, 24 Oct 2010 02:06:15 +0900 [thread overview]
Message-ID: <1287853575-14190-1-git-send-email-namhyung@gmail.com> (raw)
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@gmail.com>
---
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
next reply other threads:[~2010-10-23 17:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-23 17:06 Namhyung Kim [this message]
2010-10-23 17:21 ` [PATCH] fs/buffer.c: change buffer_busy() to use logical-OR expression Al Viro
2010-10-23 17:49 ` Namhyung Kim
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=1287853575-14190-1-git-send-email-namhyung@gmail.com \
--to=namhyung@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).