block: move down direct IO plugging
Move unplugging for direct I/O from around ->direct_IO() down to do_blockdev_direct_IO(). This implicitly adds plugging for direct writes. CC: Li Shaohua <shli@fusionio.com> Acked-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -1412,12 +1412,8 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
|
||||
retval = filemap_write_and_wait_range(mapping, pos,
|
||||
pos + iov_length(iov, nr_segs) - 1);
|
||||
if (!retval) {
|
||||
struct blk_plug plug;
|
||||
|
||||
blk_start_plug(&plug);
|
||||
retval = mapping->a_ops->direct_IO(READ, iocb,
|
||||
iov, pos, nr_segs);
|
||||
blk_finish_plug(&plug);
|
||||
}
|
||||
if (retval > 0) {
|
||||
*ppos = pos + retval;
|
||||
|
Reference in New Issue
Block a user