diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-04-03 07:13:17 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-24 10:36:38 +0300 |
commit | 0bb4a6f2ff1a9081a35b07760fa40f9880d16bc6 (patch) | |
tree | 29bca67a7e9116af5ca3bd8a7c151019c661e12a | |
parent | bb5def77d0a1e41b53f7049fdb0f640408194068 (diff) | |
download | linux-0bb4a6f2ff1a9081a35b07760fa40f9880d16bc6.tar.xz |
orangefs_kill_sb(): deal with allocation failures
commit 659038428cb43a66e3eff71e2c845c9de3611a98 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/orangefs/super.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/orangefs/super.c b/fs/orangefs/super.c index 47ebd9bfd1a1..1997ce49ab46 100644 --- a/fs/orangefs/super.c +++ b/fs/orangefs/super.c @@ -594,6 +594,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 |