Skip to content

Commit

Permalink
orangefs_kill_sb(): deal with allocation failures
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Al Viro committed Apr 16, 2018
1 parent c66b23c commit 6590384
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/orangefs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6590384

Please sign in to comment.