• Josef Bacik's avatar
    Btrfs: don't print the leaf if we had an error · b783e62d
    Josef Bacik authored
    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: default avatarJosef Bacik <josef@redhat.com>
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    b783e62d
extent-tree.c 193 KB