diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-04-04 01:47:17 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-04 03:20:57 +0400 |
commit | 45d4f855046631d63dab8832ba8a8369ed8e04bd (patch) | |
tree | ff603cb87fa84875ac4c34a2bf0f277433257dcf /fs/btrfs/file.c | |
parent | 2b665e276c15ba7d9fc8cdd16931883a51ed13e4 (diff) | |
download | linux-45d4f855046631d63dab8832ba8a8369ed8e04bd.tar.xz |
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/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 0165b8672f09..7331a230e30b 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1797,7 +1797,7 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb, BTRFS_I(inode)->last_sub_trans = root->log_transid; if (num_written > 0) { err = generic_write_sync(file, pos, num_written); - if (err < 0 && num_written > 0) + if (err < 0) num_written = err; } |