Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb146eb2 authored by Josef Bacik's avatar Josef Bacik Committed by Chris Mason
Browse files

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: default avatarJosef Bacik <jbacik@fusionio.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent 70c8a91c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
}