diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-05 14:33:31 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-05 14:33:31 +0100 |
commit | 43769f10b4826376cbf4ce17af74a5b4e8dc4fcd (patch) | |
tree | 8a7f36985f9ef8e6771163c751eeefd22ee71693 /mm | |
parent | ae7462b4f1fe1f36b5d562dbd5202a2eba01f072 (diff) | |
parent | eda58a85ec3fc05855a26654d97a2b53f0e715b9 (diff) |
Merge branches 'tracing/ftrace' and 'linus' into tracing/core
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page-writeback.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index b493db7841d..dc32dae01e5 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -1051,13 +1051,22 @@ continue_unlock: } } - if (wbc->sync_mode == WB_SYNC_NONE) { - wbc->nr_to_write--; - if (wbc->nr_to_write <= 0) { - done = 1; - break; - } + if (nr_to_write > 0) + nr_to_write--; + else if (wbc->sync_mode == WB_SYNC_NONE) { + /* + * We stop writing back only if we are not + * doing integrity sync. In case of integrity + * sync we have to keep going because someone + * may be concurrently dirtying pages, and we + * might have synced a lot of newly appeared + * dirty pages, but have not synced all of the + * old dirty pages. + */ + done = 1; + break; } + if (wbc->nonblocking && bdi_write_congested(bdi)) { wbc->encountered_congestion = 1; done = 1; |