1 From 659038428cb43a66e3eff71e2c845c9de3611a98 Mon Sep 17 00:00:00 2001
2 From: Al Viro <viro@zeniv.linux.org.uk>
3 Date: Tue, 3 Apr 2018 00:13:17 -0400
4 Subject: orangefs_kill_sb(): deal with allocation failures
6 From: Al Viro <viro@zeniv.linux.org.uk>
8 commit 659038428cb43a66e3eff71e2c845c9de3611a98 upstream.
10 orangefs_fill_sb() might've failed to allocate ORANGEFS_SB(s); don't
14 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18 fs/orangefs/super.c | 5 +++++
19 1 file changed, 5 insertions(+)
21 --- a/fs/orangefs/super.c
22 +++ b/fs/orangefs/super.c
23 @@ -579,6 +579,11 @@ void orangefs_kill_sb(struct super_block
24 /* provided sb cleanup */
27 + if (!ORANGEFS_SB(sb)) {
28 + mutex_lock(&orangefs_request_mutex);
29 + mutex_unlock(&orangefs_request_mutex);
33 * issue the unmount to userspace to tell it to remove the
34 * dynamic mount info it has for this superblock