aboutsummaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2013-09-04 15:04:40 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2013-09-04 09:23:46 -0400
commit02afc27faec94c9e068517a22acf55400976c698 (patch)
tree45de9689088ea99e1197c3f20f08cb9835a66410 /fs/block_dev.c
parent7b7a8665edd8db733980389b098530f9e4f630b2 (diff)
downloadkernel_goldelico_gta04-02afc27faec94c9e068517a22acf55400976c698.zip
kernel_goldelico_gta04-02afc27faec94c9e068517a22acf55400976c698.tar.gz
kernel_goldelico_gta04-02afc27faec94c9e068517a22acf55400976c698.tar.bz2
direct-io: Handle O_(D)SYNC AIO
Call generic_write_sync() from the deferred I/O completion handler if O_DSYNC is set for a write request. Also make sure various callers don't call generic_write_sync if the direct I/O code returns -EIOCBQUEUED. Based on an earlier patch from Jan Kara <jack@suse.cz> with updates from Jeff Moyer <jmoyer@redhat.com> and Darrick J. Wong <darrick.wong@oracle.com>. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
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 c7bda5c..1173a4e 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1519,7 +1519,7 @@ ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,
blk_start_plug(&plug);
ret = __generic_file_aio_write(iocb, iov, nr_segs, &iocb->ki_pos);
- if (ret > 0 || ret == -EIOCBQUEUED) {
+ if (ret > 0) {
ssize_t err;
err = generic_write_sync(file, pos, ret);