aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2012-10-15 13:30:43 -0400
committerChris Mason <chris.mason@fusionio.com>2012-12-16 20:46:25 -0500
commitbb146eb265091f472ada52a3419d41e9b0ff1f7d (patch)
tree445529d24fa1e970fd81aed66001662b99a54333 /fs/btrfs/disk-io.c
parent70c8a91ce21b83ccd2d9e7c968775430ead4353d (diff)
Btrfs: move checks in set_page_dirty under DEBUG
This is a high traffic function, let's try and do as little as possible during normal operations shall we? Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index faf182691b40..b8f7f04a6407 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1001,6 +1001,7 @@ static void btree_invalidatepage(struct page *page, unsigned long offset)
1001 1001
1002static int btree_set_page_dirty(struct page *page) 1002static int btree_set_page_dirty(struct page *page)
1003{ 1003{
1004#ifdef DEBUG
1004 struct extent_buffer *eb; 1005 struct extent_buffer *eb;
1005 1006
1006 BUG_ON(!PagePrivate(page)); 1007 BUG_ON(!PagePrivate(page));
@@ -1009,6 +1010,7 @@ static int btree_set_page_dirty(struct page *page)
1009 BUG_ON(!test_bit(EXTENT_BUFFER_DIRTY, &eb->bflags)); 1010 BUG_ON(!test_bit(EXTENT_BUFFER_DIRTY, &eb->bflags));
1010 BUG_ON(!atomic_read(&eb->refs)); 1011 BUG_ON(!atomic_read(&eb->refs));
1011 btrfs_assert_tree_locked(eb); 1012 btrfs_assert_tree_locked(eb);
1013#endif
1012 return __set_page_dirty_nobuffers(page); 1014 return __set_page_dirty_nobuffers(page);
1013} 1015}
1014 1016