Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130868
b: refs/heads/master
c: dcf6a79
h: refs/heads/master
v: v3
  • Loading branch information
Artem Bityutskiy authored and Linus Torvalds committed Feb 4, 2009
1 parent 7aca76c commit 3861d52
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5193535517825f9a07967e4868a1103013d0a99d
refs/heads/master: dcf6a79dda5cc2a2bec183e50d829030c0972aaa
21 changes: 15 additions & 6 deletions trunk/mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,13 +1051,22 @@ int write_cache_pages(struct address_space *mapping,
}
}

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;
Expand Down

0 comments on commit 3861d52

Please sign in to comment.