diff options
author | Ingo Molnar <mingo@elte.hu> | 2012-02-07 11:33:48 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-02-07 11:33:51 +0100 |
commit | 7915a2e902df9fdb5ea5d5786a4172b38d0ea71e (patch) | |
tree | 72b67d3079ffad2f5e21a5a449d210b355da13b6 /mm/filemap.c | |
parent | 35f1790e6c6a7e4cae57b616cf36444d27fa6b28 (diff) | |
parent | 23783f817bceedd6d4e549385e3f400ea64059e5 (diff) | |
download | op-kernel-dev-7915a2e902df9fdb5ea5d5786a4172b38d0ea71e.zip op-kernel-dev-7915a2e902df9fdb5ea5d5786a4172b38d0ea71e.tar.gz |
Merge branch 'linus' into x86/boot
Merge this into x86/boot so that we can queue up dependent patches.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 97f49ed..b6627575 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1400,15 +1400,12 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, unsigned long seg = 0; size_t count; loff_t *ppos = &iocb->ki_pos; - struct blk_plug plug; count = 0; retval = generic_segment_checks(iov, &nr_segs, &count, VERIFY_WRITE); if (retval) return retval; - blk_start_plug(&plug); - /* coalesce the iovecs and go direct-to-BIO for O_DIRECT */ if (filp->f_flags & O_DIRECT) { loff_t size; @@ -1424,8 +1421,12 @@ 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; @@ -1481,7 +1482,6 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, break; } out: - blk_finish_plug(&plug); return retval; } EXPORT_SYMBOL(generic_file_aio_read); |