diff options
author | Felix Blyakher <felixb@sgi.com> | 2009-02-09 09:34:45 -0600 |
---|---|---|
committer | Felix Blyakher <felixb@sgi.com> | 2009-02-09 09:34:45 -0600 |
commit | d41d4113f49e16bfab02eff0248282200be21807 (patch) | |
tree | ae84803c22a09f138023ef62de73712f324bc62d /mm/page-writeback.c | |
parent | b58a4cc51f4f569c6a86979890f9b237a504ab6b (diff) | |
parent | d5b562330ec766292a3ac54ae5e0673610bd5b3d (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'mm/page-writeback.c')
-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; |