diff options
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r-- | mm/page-writeback.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 2359608d2568..143c1c25d680 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -2352,10 +2352,16 @@ int do_writepages(struct address_space *mapping, struct writeback_control *wbc) | |||
2352 | 2352 | ||
2353 | if (wbc->nr_to_write <= 0) | 2353 | if (wbc->nr_to_write <= 0) |
2354 | return 0; | 2354 | return 0; |
2355 | if (mapping->a_ops->writepages) | 2355 | while (1) { |
2356 | ret = mapping->a_ops->writepages(mapping, wbc); | 2356 | if (mapping->a_ops->writepages) |
2357 | else | 2357 | ret = mapping->a_ops->writepages(mapping, wbc); |
2358 | ret = generic_writepages(mapping, wbc); | 2358 | else |
2359 | ret = generic_writepages(mapping, wbc); | ||
2360 | if ((ret != -ENOMEM) || (wbc->sync_mode != WB_SYNC_ALL)) | ||
2361 | break; | ||
2362 | cond_resched(); | ||
2363 | congestion_wait(BLK_RW_ASYNC, HZ/50); | ||
2364 | } | ||
2359 | return ret; | 2365 | return ret; |
2360 | } | 2366 | } |
2361 | 2367 | ||