summaryrefslogtreecommitdiffstats
path: root/fs/direct-io.c
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2009-11-03 10:59:10 +0100
committerPhilipp Reisner <philipp.reisner@linbit.com>2009-11-03 10:59:10 +0100
commit59131d8e0ae91f2e94909e0795923c4c7ee7eb8c (patch)
tree118e958961f1a5c2b64783ef239540397c176831 /fs/direct-io.c
parent012abeea669ea49636cf952d13298bb68654146a (diff)
parent4f570f995f68ef77aae7e5a441222f59232f2d0e (diff)
Merge branch 'for-2.6.33' of git://git.kernel.dk/linux-2.6-block into for-2.6.33
Diffstat (limited to 'fs/direct-io.c')
-rw-r--r--fs/direct-io.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 8b10b87dc01..3af761c8c5c 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -1028,9 +1028,6 @@ direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode,
if (dio->bio)
dio_bio_submit(dio);
- /* All IO is now issued, send it on its way */
- blk_run_address_space(inode->i_mapping);
-
/*
* It is possible that, we return short IO due to end of file.
* In that case, we need to release all the pages we got hold on.
@@ -1057,8 +1054,11 @@ direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode,
((rw & READ) || (dio->result == dio->size)))
ret = -EIOCBQUEUED;
- if (ret != -EIOCBQUEUED)
+ if (ret != -EIOCBQUEUED) {
+ /* All IO is now issued, send it on its way */
+ blk_run_address_space(inode->i_mapping);
dio_await_completion(dio);
+ }
/*
* Sync will always be dropping the final ref and completing the
@@ -1124,7 +1124,7 @@ __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode,
int acquire_i_mutex = 0;
if (rw & WRITE)
- rw = WRITE_ODIRECT;
+ rw = WRITE_SYNC_PLUG;
if (bdev)
bdev_blkbits = blksize_bits(bdev_logical_block_size(bdev));