Messages in this thread Patch in this message | | | Subject | [patch]mm: add more blk plug | From | Shaohua Li <> | Date | Mon, 26 Sep 2011 10:30:26 +0800 |
| |
Some filesystems implement .writepages. We don't have blk plug in such filesystems for .writepages.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 0e309cd..b9e73a1 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -1253,13 +1253,16 @@ EXPORT_SYMBOL(generic_writepages); int do_writepages(struct address_space *mapping, struct writeback_control *wbc) { int ret; + struct blk_plug plug; if (wbc->nr_to_write <= 0) return 0; + blk_start_plug(&plug); if (mapping->a_ops->writepages) ret = mapping->a_ops->writepages(mapping, wbc); else ret = generic_writepages(mapping, wbc); + blk_finish_plug(&plug); return ret; }
| |