Skip to content

Commit

Permalink
Btrfs: unwind after btrfs_start_transaction() errors
Browse files Browse the repository at this point in the history
This was added by a22285a: "Btrfs: Integrate metadata reservation
with start_transaction".  If we goto out here then we skip all the
unwinding and there are locks still held etc.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Dan Carpenter authored and Chris Mason committed Jun 11, 2010
1 parent 4cbd114 commit d327099
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
trans = btrfs_start_transaction(root, 0);
if (IS_ERR(trans)) {
err = PTR_ERR(trans);
goto out;
goto out_up_write;
}
trans->block_rsv = &root->fs_info->global_block_rsv;

Expand Down

0 comments on commit d327099

Please sign in to comment.