[patch]mm: add more blk plug

From: Shaohua Li
Date: Sun Sep 25 2011 - 22:25:56 EST


Some filesystems implement .writepages. We don't have blk plug
in such filesystems for .writepages.

Signed-off-by: Shaohua Li <shaohua.li@xxxxxxxxx>

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;
}



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/