summaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-04-03 23:47:17 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-04 01:20:57 +0200
commit45d4f855046631d63dab8832ba8a8369ed8e04bd (patch)
treeff603cb87fa84875ac4c34a2bf0f277433257dcf /fs/block_dev.c
parentfs/direct-io.c: remove redundant comparison (diff)
downloadlinux-45d4f855046631d63dab8832ba8a8369ed8e04bd.tar.xz
linux-45d4f855046631d63dab8832ba8a8369ed8e04bd.zip
fs/direct-io.c: remove some left over checks
We know that "ret > 0" is true here. These tests were left over from commit 02afc27faec9 ('direct-io: Handle O_(D)SYNC AIO') and aren't needed any more. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 1e86823a9cbd..e4cba21a627e 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1523,7 +1523,7 @@ ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,
ssize_t err;
err = generic_write_sync(file, pos, ret);
- if (err < 0 && ret > 0)
+ if (err < 0)
ret = err;
}
blk_finish_plug(&plug);