aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page-writeback.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r--mm/page-writeback.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 2e847cdcad0e..5edca676e2c3 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -963,8 +963,10 @@ retry:
963 } 963 }
964 } 964 }
965 965
966 if (--nr_to_write <= 0) 966 if (wbc->sync_mode == WB_SYNC_NONE) {
967 done = 1; 967 if (--wbc->nr_to_write <= 0)
968 done = 1;
969 }
968 if (wbc->nonblocking && bdi_write_congested(bdi)) { 970 if (wbc->nonblocking && bdi_write_congested(bdi)) {
969 wbc->encountered_congestion = 1; 971 wbc->encountered_congestion = 1;
970 done = 1; 972 done = 1;