diff options
Diffstat (limited to 'mm/page-writeback.c')
| -rw-r--r-- | mm/page-writeback.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 7262aacea8a2..e3bccac1f025 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
| @@ -836,7 +836,8 @@ void tag_pages_for_writeback(struct address_space *mapping, | |||
| 836 | spin_unlock_irq(&mapping->tree_lock); | 836 | spin_unlock_irq(&mapping->tree_lock); |
| 837 | WARN_ON_ONCE(tagged > WRITEBACK_TAG_BATCH); | 837 | WARN_ON_ONCE(tagged > WRITEBACK_TAG_BATCH); |
| 838 | cond_resched(); | 838 | cond_resched(); |
| 839 | } while (tagged >= WRITEBACK_TAG_BATCH); | 839 | /* We check 'start' to handle wrapping when end == ~0UL */ |
| 840 | } while (tagged >= WRITEBACK_TAG_BATCH && start); | ||
| 840 | } | 841 | } |
| 841 | EXPORT_SYMBOL(tag_pages_for_writeback); | 842 | EXPORT_SYMBOL(tag_pages_for_writeback); |
| 842 | 843 | ||
| @@ -984,22 +985,16 @@ continue_unlock: | |||
| 984 | } | 985 | } |
| 985 | } | 986 | } |
| 986 | 987 | ||
| 987 | if (wbc->nr_to_write > 0) { | 988 | /* |
| 988 | if (--wbc->nr_to_write == 0 && | 989 | * We stop writing back only if we are not doing |
| 989 | wbc->sync_mode == WB_SYNC_NONE) { | 990 | * integrity sync. In case of integrity sync we have to |
| 990 | /* | 991 | * keep going until we have written all the pages |
| 991 | * We stop writing back only if we are | 992 | * we tagged for writeback prior to entering this loop. |
| 992 | * not doing integrity sync. In case of | 993 | */ |
| 993 | * integrity sync we have to keep going | 994 | if (--wbc->nr_to_write <= 0 && |
| 994 | * because someone may be concurrently | 995 | wbc->sync_mode == WB_SYNC_NONE) { |
| 995 | * dirtying pages, and we might have | 996 | done = 1; |
| 996 | * synced a lot of newly appeared dirty | 997 | break; |
| 997 | * pages, but have not synced all of the | ||
| 998 | * old dirty pages. | ||
| 999 | */ | ||
| 1000 | done = 1; | ||
| 1001 | break; | ||
| 1002 | } | ||
| 1003 | } | 998 | } |
| 1004 | } | 999 | } |
| 1005 | pagevec_release(&pvec); | 1000 | pagevec_release(&pvec); |
| @@ -1131,6 +1126,7 @@ void account_page_dirtied(struct page *page, struct address_space *mapping) | |||
| 1131 | task_io_account_write(PAGE_CACHE_SIZE); | 1126 | task_io_account_write(PAGE_CACHE_SIZE); |
| 1132 | } | 1127 | } |
| 1133 | } | 1128 | } |
| 1129 | EXPORT_SYMBOL(account_page_dirtied); | ||
| 1134 | 1130 | ||
| 1135 | /* | 1131 | /* |
| 1136 | * For address_spaces which do not use buffers. Just tag the page as dirty in | 1132 | * For address_spaces which do not use buffers. Just tag the page as dirty in |
