1
0
Fork 0

orangefs_kill_sb(): deal with allocation failures

commit 659038428c 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>
pull/10/head
Al Viro 2018-04-03 00:13:17 -04:00 committed by Greg Kroah-Hartman
parent bb5def77d0
commit 0bb4a6f2ff
1 changed files with 5 additions and 0 deletions

View File

@ -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