summaryrefslogtreecommitdiff
path: root/fs/orangefs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-04-03 07:13:17 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2018-04-16 06:49:12 +0300
commit659038428cb43a66e3eff71e2c845c9de3611a98 (patch)
tree6aa80ece2be05799ad7033085f5cc7936c53a43b /fs/orangefs
parentc66b23c2840446a82c389e4cb1a12eb2a71fa2e4 (diff)
downloadlinux-659038428cb43a66e3eff71e2c845c9de3611a98.tar.xz
orangefs_kill_sb(): deal with allocation failures
orangefs_fill_sb() might've failed to allocate ORANGEFS_SB(s); don't oops in that case. Cc: stable@kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/orangefs')
-rw-r--r--fs/orangefs/super.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/orangefs/super.c b/fs/orangefs/super.c
index 3ae5fdba0225..10796d3fe27d 100644
--- a/fs/orangefs/super.c
+++ b/fs/orangefs/super.c
@@ -579,6 +579,11 @@ void orangefs_kill_sb(struct super_block *sb)
/* provided sb cleanup */
kill_anon_super(sb);
+ if (!ORANGEFS_SB(sb)) {
+ mutex_lock(&orangefs_request_mutex);
+ mutex_unlock(&orangefs_request_mutex);
+ return;
+ }
/*
* issue the unmount to userspace to tell it to remove the
* dynamic mount info it has for this superblock