Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217450
b: refs/heads/master
c: f629d1c
h: refs/heads/master
v: v3
  • Loading branch information
Michael Rubin authored and Linus Torvalds committed Oct 26, 2010
1 parent e609981 commit 865b2ac
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 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: 0def08e3acc2c9c934e4671487029aed52202d42
refs/heads/master: f629d1c9bd0dbc44a6c4f9a4a67d1646c42bfc6f
2 changes: 1 addition & 1 deletion trunk/fs/nilfs2/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,7 @@ nilfs_copy_replace_page_buffers(struct page *page, struct list_head *out)
kunmap_atomic(kaddr, KM_USER0);

if (!TestSetPageWriteback(clone_page))
inc_zone_page_state(clone_page, NR_WRITEBACK);
account_page_writeback(clone_page);
unlock_page(clone_page);

return 0;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,7 @@ int __set_page_dirty_no_writeback(struct page *page);
int redirty_page_for_writepage(struct writeback_control *wbc,
struct page *page);
void account_page_dirtied(struct page *page, struct address_space *mapping);
void account_page_writeback(struct page *page);
int set_page_dirty(struct page *page);
int set_page_dirty_lock(struct page *page);
int clear_page_dirty_for_io(struct page *page);
Expand Down
13 changes: 12 additions & 1 deletion trunk/mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,17 @@ void account_page_dirtied(struct page *page, struct address_space *mapping)
}
EXPORT_SYMBOL(account_page_dirtied);

/*
* Helper function for set_page_writeback family.
* NOTE: Unlike account_page_dirtied this does not rely on being atomic
* wrt interrupts.
*/
void account_page_writeback(struct page *page)
{
inc_zone_page_state(page, NR_WRITEBACK);
}
EXPORT_SYMBOL(account_page_writeback);

/*
* For address_spaces which do not use buffers. Just tag the page as dirty in
* its radix tree.
Expand Down Expand Up @@ -1366,7 +1377,7 @@ int test_set_page_writeback(struct page *page)
ret = TestSetPageWriteback(page);
}
if (!ret)
inc_zone_page_state(page, NR_WRITEBACK);
account_page_writeback(page);
return ret;

}
Expand Down

0 comments on commit 865b2ac

Please sign in to comment.