diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-03-24 07:17:25 +0100 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-03-24 07:17:25 +0100 |
commit | a3d3362287fbe96fe90abdb5c6d1a35471129a8c (patch) | |
tree | ad3c85ed1feef470c66599eb514e30f43c2db5dd /mm/page-writeback.c | |
parent | sh: Fix ptrace hw_breakpoint handling (diff) | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiw... (diff) | |
download | linux-a3d3362287fbe96fe90abdb5c6d1a35471129a8c.tar.xz linux-a3d3362287fbe96fe90abdb5c6d1a35471129a8c.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-latest
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r-- | mm/page-writeback.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 2cb01f6ec5d0..632b46479c94 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -927,7 +927,7 @@ retry: break; } - done_index = page->index + 1; + done_index = page->index; lock_page(page); @@ -977,6 +977,7 @@ continue_unlock: * not be suitable for data integrity * writeout). */ + done_index = page->index + 1; done = 1; break; } @@ -1211,6 +1212,17 @@ int set_page_dirty(struct page *page) if (likely(mapping)) { int (*spd)(struct page *) = mapping->a_ops->set_page_dirty; + /* + * readahead/lru_deactivate_page could remain + * PG_readahead/PG_reclaim due to race with end_page_writeback + * About readahead, if the page is written, the flags would be + * reset. So no problem. + * About lru_deactivate_page, if the page is redirty, the flag + * will be reset. So no problem. but if the page is used by readahead + * it will confuse readahead and make it restart the size rampup + * process. But it's a trivial problem. + */ + ClearPageReclaim(page); #ifdef CONFIG_BLOCK if (!spd) spd = __set_page_dirty_buffers; @@ -1266,7 +1278,6 @@ int clear_page_dirty_for_io(struct page *page) BUG_ON(!PageLocked(page)); - ClearPageReclaim(page); if (mapping && mapping_cap_account_dirty(mapping)) { /* * Yes, Virginia, this is indeed insane. |