Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131294
b: refs/heads/master
c: 89e1219
h: refs/heads/master
v: v3
  • Loading branch information
Federico Cuello authored and Linus Torvalds committed Feb 11, 2009
1 parent 1a2c1fe commit 2796776
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 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: 6c5979631b4b03c9288776562c18036765e398c1
refs/heads/master: 89e1219004b3657cc014521663eeef0744f1c99d
29 changes: 16 additions & 13 deletions trunk/mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,20 +1051,23 @@ int write_cache_pages(struct address_space *mapping,
}
}

if (nr_to_write > 0)
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 (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;
}
}

if (wbc->nonblocking && bdi_write_congested(bdi)) {
Expand Down

0 comments on commit 2796776

Please sign in to comment.