mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 08:52:27 +00:00
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 <[email protected]> Reviewed-by: Jeff Moyer <[email protected]> Cc: Al Viro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user