]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
Btrfs: move checks in set_page_dirty under DEBUG
authorJosef Bacik <jbacik@fusionio.com>
Mon, 15 Oct 2012 17:30:43 +0000 (13:30 -0400)
committerChris Mason <chris.mason@fusionio.com>
Mon, 17 Dec 2012 01:46:25 +0000 (20:46 -0500)
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>
fs/btrfs/disk-io.c

index faf182691b40d8f6709f0ae60785f0da23253190..b8f7f04a64078b1358075b7424dbae12fb3ffcfc 100644 (file)
@@ -1001,6 +1001,7 @@ static void btree_invalidatepage(struct page *page, unsigned long offset)
 
 static int btree_set_page_dirty(struct page *page)
 {
+#ifdef DEBUG
        struct extent_buffer *eb;
 
        BUG_ON(!PagePrivate(page));
@@ -1009,6 +1010,7 @@ static int btree_set_page_dirty(struct page *page)
        BUG_ON(!test_bit(EXTENT_BUFFER_DIRTY, &eb->bflags));
        BUG_ON(!atomic_read(&eb->refs));
        btrfs_assert_tree_locked(eb);
+#endif
        return __set_page_dirty_nobuffers(page);
 }