diff options
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r-- | mm/page-writeback.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 632b46479c94..31f698862420 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -1040,11 +1040,17 @@ static int __writepage(struct page *page, struct writeback_control *wbc, | |||
1040 | int generic_writepages(struct address_space *mapping, | 1040 | int generic_writepages(struct address_space *mapping, |
1041 | struct writeback_control *wbc) | 1041 | struct writeback_control *wbc) |
1042 | { | 1042 | { |
1043 | struct blk_plug plug; | ||
1044 | int ret; | ||
1045 | |||
1043 | /* deal with chardevs and other special file */ | 1046 | /* deal with chardevs and other special file */ |
1044 | if (!mapping->a_ops->writepage) | 1047 | if (!mapping->a_ops->writepage) |
1045 | return 0; | 1048 | return 0; |
1046 | 1049 | ||
1047 | return write_cache_pages(mapping, wbc, __writepage, mapping); | 1050 | blk_start_plug(&plug); |
1051 | ret = write_cache_pages(mapping, wbc, __writepage, mapping); | ||
1052 | blk_finish_plug(&plug); | ||
1053 | return ret; | ||
1048 | } | 1054 | } |
1049 | 1055 | ||
1050 | EXPORT_SYMBOL(generic_writepages); | 1056 | EXPORT_SYMBOL(generic_writepages); |
@@ -1251,7 +1257,7 @@ int set_page_dirty_lock(struct page *page) | |||
1251 | { | 1257 | { |
1252 | int ret; | 1258 | int ret; |
1253 | 1259 | ||
1254 | lock_page_nosync(page); | 1260 | lock_page(page); |
1255 | ret = set_page_dirty(page); | 1261 | ret = set_page_dirty(page); |
1256 | unlock_page(page); | 1262 | unlock_page(page); |
1257 | return ret; | 1263 | return ret; |