diff options
| -rw-r--r-- | mm/page-writeback.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index c17005e73974..6106a5c7ed44 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
| @@ -1051,20 +1051,23 @@ continue_unlock: | |||
| 1051 | } | 1051 | } |
| 1052 | } | 1052 | } |
| 1053 | 1053 | ||
| 1054 | if (nr_to_write > 0) | 1054 | if (nr_to_write > 0) { |
| 1055 | nr_to_write--; | 1055 | nr_to_write--; |
| 1056 | else if (wbc->sync_mode == WB_SYNC_NONE) { | 1056 | if (nr_to_write == 0 && |
| 1057 | /* | 1057 | wbc->sync_mode == WB_SYNC_NONE) { |
| 1058 | * We stop writing back only if we are not | 1058 | /* |
| 1059 | * doing integrity sync. In case of integrity | 1059 | * We stop writing back only if we are |
| 1060 | * sync we have to keep going because someone | 1060 | * not doing integrity sync. In case of |
| 1061 | * may be concurrently dirtying pages, and we | 1061 | * integrity sync we have to keep going |
| 1062 | * might have synced a lot of newly appeared | 1062 | * because someone may be concurrently |
| 1063 | * dirty pages, but have not synced all of the | 1063 | * dirtying pages, and we might have |
| 1064 | * old dirty pages. | 1064 | * synced a lot of newly appeared dirty |
| 1065 | */ | 1065 | * pages, but have not synced all of the |
| 1066 | done = 1; | 1066 | * old dirty pages. |
| 1067 | break; | 1067 | */ |
| 1068 | done = 1; | ||
| 1069 | break; | ||
| 1070 | } | ||
| 1068 | } | 1071 | } |
| 1069 | 1072 | ||
| 1070 | if (wbc->nonblocking && bdi_write_congested(bdi)) { | 1073 | if (wbc->nonblocking && bdi_write_congested(bdi)) { |
