Bläddra i källkod

orangefs_kill_sb(): deal with allocation failures

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>
Al Viro 7 år sedan
förälder
incheckning
659038428c
1 ändrade filer med 5 tillägg och 0 borttagningar
  1. 5 0
      fs/orangefs/super.c

+ 5 - 0
fs/orangefs/super.c

@@ -579,6 +579,11 @@ void orangefs_kill_sb(struct super_block *sb)
 	/* provided sb cleanup */
 	/* provided sb cleanup */
 	kill_anon_super(sb);
 	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
 	 * issue the unmount to userspace to tell it to remove the
 	 * dynamic mount info it has for this superblock
 	 * dynamic mount info it has for this superblock