diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-04-03 00:13:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-24 09:34:17 +0200 |
commit | e2210c5414a8e05e14c5864180ec215dec343828 (patch) | |
tree | dc415f4c1a0e1c4a38d24a751272eae26a122375 /fs | |
parent | f3ba3eaaee8bc8c07d58d2a6050f9892ba01c306 (diff) |
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>
Diffstat (limited to 'fs')
-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 629d8c917fa6..6e35ef6521b4 100644 --- a/fs/orangefs/super.c +++ b/fs/orangefs/super.c @@ -559,6 +559,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 |