diff options
author | Martin Brandenburg <martin@omnibond.com> | 2017-04-14 14:22:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-04-15 12:39:31 -0400 |
commit | 1ec1688c5360e14dde4094d6acbf7516bf6db37e (patch) | |
tree | 6113cf3ae94e7f9a52e10ffaae92fda82c98a1af /fs/orangefs/devorangefs-req.c | |
parent | c0eb027e5aef70b71e5a38ee3e264dc0b497f343 (diff) |
orangefs: free superblock when mount fails
Otherwise lockdep says:
[ 1337.483798] ================================================
[ 1337.483999] [ BUG: lock held when returning to user space! ]
[ 1337.484252] 4.11.0-rc6 #19 Not tainted
[ 1337.484423] ------------------------------------------------
[ 1337.484626] mount/14766 is leaving the kernel with locks still held!
[ 1337.484841] 1 lock held by mount/14766:
[ 1337.485017] #0: (&type->s_umount_key#33/1){+.+.+.}, at: [<ffffffff8124171f>] sget_userns+0x2af/0x520
Caught by xfstests generic/413 which tried to mount with the unsupported
mount option dax. Then xfstests generic/422 ran sync which deadlocks.
Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Acked-by: Mike Marshall <hubcap@omnibond.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/orangefs/devorangefs-req.c')
-rw-r--r-- | fs/orangefs/devorangefs-req.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c index c4ab6fdf17a0..e1534c9bab16 100644 --- a/fs/orangefs/devorangefs-req.c +++ b/fs/orangefs/devorangefs-req.c | |||
@@ -208,14 +208,19 @@ restart: | |||
208 | continue; | 208 | continue; |
209 | /* | 209 | /* |
210 | * Skip ops whose filesystem we don't know about unless | 210 | * Skip ops whose filesystem we don't know about unless |
211 | * it is being mounted. | 211 | * it is being mounted or unmounted. It is possible for |
212 | * a filesystem we don't know about to be unmounted if | ||
213 | * it fails to mount in the kernel after userspace has | ||
214 | * been sent the mount request. | ||
212 | */ | 215 | */ |
213 | /* XXX: is there a better way to detect this? */ | 216 | /* XXX: is there a better way to detect this? */ |
214 | } else if (ret == -1 && | 217 | } else if (ret == -1 && |
215 | !(op->upcall.type == | 218 | !(op->upcall.type == |
216 | ORANGEFS_VFS_OP_FS_MOUNT || | 219 | ORANGEFS_VFS_OP_FS_MOUNT || |
217 | op->upcall.type == | 220 | op->upcall.type == |
218 | ORANGEFS_VFS_OP_GETATTR)) { | 221 | ORANGEFS_VFS_OP_GETATTR || |
222 | op->upcall.type == | ||
223 | ORANGEFS_VFS_OP_FS_UMOUNT)) { | ||
219 | gossip_debug(GOSSIP_DEV_DEBUG, | 224 | gossip_debug(GOSSIP_DEV_DEBUG, |
220 | "orangefs: skipping op tag %llu %s\n", | 225 | "orangefs: skipping op tag %llu %s\n", |
221 | llu(op->tag), get_opname_string(op)); | 226 | llu(op->tag), get_opname_string(op)); |