]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: don't print the leaf if we had an error
authorJosef Bacik <josef@redhat.com>
Wed, 13 Jul 2011 15:03:50 +0000 (15:03 +0000)
committerChris Mason <chris.mason@oracle.com>
Mon, 1 Aug 2011 18:30:45 +0000 (14:30 -0400)
commit84fc353994324eee79c79d572458100767271036
treea97b81f62f0b431a4c3e5c4f6346ca890e535cb6
parentb17326ff5c37cdadeccb9e807dc1a8280f93b9fa
Btrfs: don't print the leaf if we had an error

In __btrfs_free_extent we will print the leaf if we fail to find the extent we
wanted, but the problem is if we get an error we won't have a leaf so often this
leads to a NULL pointer dereference and we lose the error that actually
occurred.  So only print the leaf if ret > 0, which means we didn't find the
item we were looking for but we didn't error either.  This way the error is
preserved.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/extent-tree.c