Btrfs: fix missing write access release in btrfs_ioctl_resize()
authorMiao Xie <miaox@cn.fujitsu.com>
Fri, 21 Dec 2012 10:38:50 +0000 (10:38 +0000)
committerJosef Bacik <josef@toxicpanda.com>
Mon, 14 Jan 2013 18:52:51 +0000 (13:52 -0500)
We forget to give up the write access after we find some device operation
is going on. Fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/ioctl.c

index 0de21213d05d2dd7edd5e0122bb639e569897155..982c0b9ceea5b036f214bdf714402f95de5e1c34 100644 (file)
@@ -1339,6 +1339,7 @@ static noinline int btrfs_ioctl_resize(struct file *file,
        if (atomic_xchg(&root->fs_info->mutually_exclusive_operation_running,
                        1)) {
                pr_info("btrfs: dev add/delete/balance/replace/resize operation in progress\n");
+               mnt_drop_write_file(file);
                return -EINPROGRESS;
        }