From: Julia Lawall Date: Thu, 7 Jun 2012 22:45:00 +0000 (-0700) Subject: fs/direct-io.c: adjust suspicious bit operation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d187663ef24c;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git fs/direct-io.c: adjust suspicious bit operation READ is 0, so the result of the bit-and operation is 0. Rewrite with == as done elsewhere in the same file. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). Signed-off-by: Julia Lawall Reviewed-by: Jeff Moyer Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Al Viro --- diff --git a/fs/direct-io.c b/fs/direct-io.c index 0c85fae37666..1faf4cb56f39 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -1258,7 +1258,7 @@ do_blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, */ BUG_ON(retval == -EIOCBQUEUED); if (dio->is_async && retval == 0 && dio->result && - ((rw & READ) || (dio->result == sdio.size))) + ((rw == READ) || (dio->result == sdio.size))) retval = -EIOCBQUEUED; if (retval != -EIOCBQUEUED)