Btrfs: abort the transaction when we don't find our extent ref
authorJosef Bacik <jbacik@fb.com>
Fri, 14 Mar 2014 20:36:53 +0000 (16:36 -0400)
committerChris Mason <clm@fb.com>
Mon, 7 Apr 2014 16:08:51 +0000 (09:08 -0700)
I'm not sure why we weren't aborting here in the first place, it is obviously a
bad time from the fact that we print the leaf and yell loudly about it.  Fix
this up, otherwise we panic because our path could be pointing into oblivion.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/extent-tree.c

index 1341163abe688ac5a3f6b4bfe6724a2a4c1b6456..1306487c82cf6a05c8c528f8851fbe70d84c1f80 100644 (file)
@@ -5745,6 +5745,8 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
                        "unable to find ref byte nr %llu parent %llu root %llu  owner %llu offset %llu",
                        bytenr, parent, root_objectid, owner_objectid,
                        owner_offset);
+               btrfs_abort_transaction(trans, extent_root, ret);
+               goto out;
        } else {
                btrfs_abort_transaction(trans, extent_root, ret);
                goto out;