]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
Btrfs: unwind after btrfs_start_transaction() errors
authorDan Carpenter <error27@gmail.com>
Sat, 29 May 2010 09:46:47 +0000 (09:46 +0000)
committerChris Mason <chris.mason@oracle.com>
Fri, 11 Jun 2010 19:57:35 +0000 (15:57 -0400)
This was added by a22285a6a3: "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>
fs/btrfs/ioctl.c

index 4cdb98cf26de174e644e7d74e2a97e2fe037f08b..9f9a1d9607a73803e192d452f2eac4d7e70781c4 100644 (file)
@@ -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;