X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=fs%2Fdirect-io.c;h=3af761c8c5cc49241e63b2f27d419844a97f3c90;hb=cfb1e33eed48165763edc7a4a067cf5f74898d0b;hp=c86d35f142de36416263a83d4dc8d036b9a6fe97;hpb=1af60fbd759d31f565552fea315c2033947cfbe6;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git diff --git a/fs/direct-io.c b/fs/direct-io.c index c86d35f..3af761c 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