summaryrefslogtreecommitdiffstats
path: root/fs/mpage.c
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2010-06-22 12:52:14 +0200
committerJens Axboe <jaxboe@fusionio.com>2011-03-10 08:52:26 +0100
commit2ed1a6bcf97a7ed787e6799bf2e80b9e6f51dca7 (patch)
treebd59ce82d995cc97aa7579000690b9a4d1f4c804 /fs/mpage.c
parent5b417b1873694ece3291d7f64a943304559a817b (diff)
downloadlinux-2ed1a6bcf97a7ed787e6799bf2e80b9e6f51dca7.tar.gz
linux-2ed1a6bcf97a7ed787e6799bf2e80b9e6f51dca7.tar.bz2
linux-2ed1a6bcf97a7ed787e6799bf2e80b9e6f51dca7.zip
fs: make mpage read/write_pages() plug
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'fs/mpage.c')
-rw-r--r--fs/mpage.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/mpage.c b/fs/mpage.c
index d78455a81ec9..0afc809e46e0 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -364,6 +364,9 @@ mpage_readpages(struct address_space *mapping, struct list_head *pages,
sector_t last_block_in_bio = 0;
struct buffer_head map_bh;
unsigned long first_logical_block = 0;
+ struct blk_plug plug;
+
+ blk_start_plug(&plug);
map_bh.b_state = 0;
map_bh.b_size = 0;
@@ -385,6 +388,7 @@ mpage_readpages(struct address_space *mapping, struct list_head *pages,
BUG_ON(!list_empty(pages));
if (bio)
mpage_bio_submit(READ, bio);
+ blk_finish_plug(&plug);
return 0;
}
EXPORT_SYMBOL(mpage_readpages);
@@ -666,8 +670,11 @@ int
mpage_writepages(struct address_space *mapping,
struct writeback_control *wbc, get_block_t get_block)
{
+ struct blk_plug plug;
int ret;
+ blk_start_plug(&plug);
+
if (!get_block)
ret = generic_writepages(mapping, wbc);
else {
@@ -682,6 +689,7 @@ mpage_writepages(struct address_space *mapping,
if (mpd.bio)
mpage_bio_submit(WRITE, mpd.bio);
}
+ blk_finish_plug(&plug);
return ret;
}
EXPORT_SYMBOL(mpage_writepages);