clean up __set_page_dirty_nobuffers()
Subsystems (3)
PATCH 2/13 clean up __set_page_dirty_nobuffers()
From: Andrew Morton <[email protected]>
Save a tabstop in __set_page_dirty_nobuffers() and __set_page_dirty_buffers() and a few other places. No functional changes.
Cc Jay Lan <[email protected]>
Cc Shailabh Nagar <[email protected]>
Cc Balbir Singh <[email protected]>
Cc Chris Sturtivant <[email protected]>
Cc Tony Ernst <[email protected]>
Cc Guillaume Thouvenin <[email protected]>
Cc David Wright <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
fs/buffer.c | 25 +++++------ mm/page-writeback.c | 88 ++++++++++++++++++++---------------------- 2 files changed, 55 insertions(+), 58 deletions(-)
fs/buffer.c renamed from fs/buffer.c~clean-up-__set_page_dirty_nobuffers +12 -13
@@ -724,20 +724,19 @@ int __set_page_dirty_buffers(struct page }spin_unlock (&mapping->private_lock); -if (!TestSetPageDirty (page)) { -write_lock_irq (&mapping->tree_lock); -if (page->mapping) {/* Race with truncate? */ -if (mapping_cap_account_dirty (mapping)) -__inc_zone_page_state (page,NR_FILE_DIRTY ); -radix_tree_tag_set (&mapping->page_tree, -page_index (page), -PAGECACHE_TAG_DIRTY ); - } -write_unlock_irq (&mapping->tree_lock); -__mark_inode_dirty (mapping->host,I_DIRTY_PAGES ); -return 1 ; +if (TestSetPageDirty (page)) +return 0 ; + +write_lock_irq (&mapping->tree_lock); +if (page->mapping) {/* Race with truncate? */ +if (mapping_cap_account_dirty (mapping)) +__inc_zone_page_state (page,NR_FILE_DIRTY ); +radix_tree_tag_set (&mapping->page_tree, +page_index (page),PAGECACHE_TAG_DIRTY ); } -return 0 ; +write_unlock_irq (&mapping->tree_lock); +__mark_inode_dirty (mapping->host,I_DIRTY_PAGES ); +return 1 ; }EXPORT_SYMBOL (__set_page_dirty_buffers);
mm/page-writeback.c renamed from mm/page-writeback.c~clean-up-__set_page_dirty_nobuffers +43 -45
110 lines not on this page · raw message
_