linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] Btrfs: fix missing write access release in btrfs_ioctl_resize()
@ 2012-12-21  9:19 Miao Xie
  2012-12-21 10:22 ` Stefan Behrens
  2012-12-21 10:38 ` [PATCH V2 " Miao Xie
  0 siblings, 2 replies; 4+ messages in thread
From: Miao Xie @ 2012-12-21  9:19 UTC (permalink / raw)
  To: Linux Btrfs

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>
---
 fs/btrfs/ioctl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 7624212..679b82c 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1338,7 +1338,9 @@ 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");
+		pr_info("btrfs: dev add/delete/balance/replace/resize operation"
+			" in progress\n");
+		mnt_drop_write_file(file);
 		return -EINPROGRESS;
 	}
 
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-21 11:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-21  9:19 [PATCH 1/3] Btrfs: fix missing write access release in btrfs_ioctl_resize() Miao Xie
2012-12-21 10:22 ` Stefan Behrens
2012-12-21 10:35   ` Miao Xie
2012-12-21 10:38 ` [PATCH V2 " Miao Xie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).