diff options
author | Andrew Morton <akpm@osdl.org> | 2006-12-10 05:19:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-10 12:55:41 -0500 |
commit | 8c08540f8755c451d8b96ea14cfe796bc3cd712d (patch) | |
tree | ca2ba9673ce1c2733c538012105681b238265e48 /fs/buffer.c | |
parent | 7c3ab7381e79dfc7db14a67c6f4f3285664e1ec2 (diff) |
[PATCH] clean up __set_page_dirty_nobuffers()
Save a tabstop in __set_page_dirty_nobuffers() and __set_page_dirty_buffers()
and a few other places. No functional changes.
Cc: Jay Lan <jlan@sgi.com>
Cc: Shailabh Nagar <nagar@watson.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Chris Sturtivant <csturtiv@sgi.com>
Cc: Tony Ernst <tee@sgi.com>
Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
Cc: David Wright <daw@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 517860f2d75b..865570fe0d39 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -724,20 +724,19 @@ int __set_page_dirty_buffers(struct page *page) | |||
724 | } | 724 | } |
725 | spin_unlock(&mapping->private_lock); | 725 | spin_unlock(&mapping->private_lock); |
726 | 726 | ||
727 | if (!TestSetPageDirty(page)) { | 727 | if (TestSetPageDirty(page)) |
728 | write_lock_irq(&mapping->tree_lock); | 728 | return 0; |
729 | if (page->mapping) { /* Race with truncate? */ | 729 | |
730 | if (mapping_cap_account_dirty(mapping)) | 730 | write_lock_irq(&mapping->tree_lock); |
731 | __inc_zone_page_state(page, NR_FILE_DIRTY); | 731 | if (page->mapping) { /* Race with truncate? */ |
732 | radix_tree_tag_set(&mapping->page_tree, | 732 | if (mapping_cap_account_dirty(mapping)) |
733 | page_index(page), | 733 | __inc_zone_page_state(page, NR_FILE_DIRTY); |
734 | PAGECACHE_TAG_DIRTY); | 734 | radix_tree_tag_set(&mapping->page_tree, |
735 | } | 735 | page_index(page), PAGECACHE_TAG_DIRTY); |
736 | write_unlock_irq(&mapping->tree_lock); | ||
737 | __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); | ||
738 | return 1; | ||
739 | } | 736 | } |
740 | return 0; | 737 | write_unlock_irq(&mapping->tree_lock); |
738 | __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); | ||
739 | return 1; | ||
741 | } | 740 | } |
742 | EXPORT_SYMBOL(__set_page_dirty_buffers); | 741 | EXPORT_SYMBOL(__set_page_dirty_buffers); |
743 | 742 | ||