summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2012-12-21 11:38:50 +0100
committerJosef Bacik <josef@toxicpanda.com>2013-01-14 19:52:51 +0100
commit97547676570b3bd908560741315bf4b7d635bcf5 (patch)
tree61fd3a2841cd9267e137da250dbf5bca5bda5a20 /fs
parentBtrfs: fix resize a readonly device (diff)
downloadlinux-97547676570b3bd908560741315bf4b7d635bcf5.tar.xz
linux-97547676570b3bd908560741315bf4b7d635bcf5.zip
Btrfs: fix missing write access release in btrfs_ioctl_resize()
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/ioctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 0de21213d05d..982c0b9ceea5 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -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;
}