From: Josef Bacik Date: Mon, 15 Oct 2012 17:30:43 +0000 (-0400) Subject: Btrfs: move checks in set_page_dirty under DEBUG X-Git-Tag: Ubuntu-5.0.0-8.9~14638^2~13 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=bb146eb265091f472ada52a3419d41e9b0ff1f7d;p=mirror_ubuntu-disco-kernel.git 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 Signed-off-by: Chris Mason --- 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) 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); }