|
@@ -985,22 +985,16 @@ continue_unlock:
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (wbc->nr_to_write > 0) {
|
|
|
|
- if (--wbc->nr_to_write == 0 &&
|
|
|
|
- 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;
|
|
|
|
- }
|
|
|
|
|
|
+ /*
|
|
|
|
+ * We stop writing back only if we are not doing
|
|
|
|
+ * integrity sync. In case of integrity sync we have to
|
|
|
|
+ * keep going until we have written all the pages
|
|
|
|
+ * we tagged for writeback prior to entering this loop.
|
|
|
|
+ */
|
|
|
|
+ if (--wbc->nr_to_write <= 0 &&
|
|
|
|
+ wbc->sync_mode == WB_SYNC_NONE) {
|
|
|
|
+ done = 1;
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
pagevec_release(&pvec);
|
|
pagevec_release(&pvec);
|