Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97547676 authored by Miao Xie's avatar Miao Xie Committed by Josef Bacik
Browse files

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: default avatarMiao Xie <miaox@cn.fujitsu.com>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
parent dba60f3f
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1339,6 +1339,7 @@ static noinline int btrfs_ioctl_resize(struct file *file,
	if (atomic_xchg(&root->fs_info->mutually_exclusive_operation_running,
	if (atomic_xchg(&root->fs_info->mutually_exclusive_operation_running,
			1)) {
			1)) {
		pr_info("btrfs: dev add/delete/balance/replace/resize operation in progress\n");
		pr_info("btrfs: dev add/delete/balance/replace/resize operation in progress\n");
		mnt_drop_write_file(file);
		return -EINPROGRESS;
		return -EINPROGRESS;
	}
	}