aboutsummaryrefslogtreecommitdiff
path: root/mm/page-writeback.c
diff options
context:
space:
mode:
authorFelix Blyakher <felixb@sgi.com>2009-02-09 09:34:45 -0600
committerFelix Blyakher <felixb@sgi.com>2009-02-09 09:34:45 -0600
commitd41d4113f49e16bfab02eff0248282200be21807 (patch)
treeae84803c22a09f138023ef62de73712f324bc62d /mm/page-writeback.c
parentb58a4cc51f4f569c6a86979890f9b237a504ab6b (diff)
parentd5b562330ec766292a3ac54ae5e0673610bd5b3d (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.c21
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;