fix oops in fs/9p late mount failure
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 25 Jan 2010 11:16:19 +0000 (06:16 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 27 Jan 2010 03:22:27 +0000 (22:22 -0500)
if 9P ->get_sb() fails late (at root inode or root dentry
allocation), we'll hit its ->kill_sb() with NULL ->s_root

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/9p/vfs_super.c

index 14a86448572cc0eb0de2e472e47cf2fdd80466b5..69357c0d9899c1c3e52e090b0ce3d4725b18c41b 100644 (file)
@@ -188,7 +188,8 @@ static void v9fs_kill_super(struct super_block *s)
 
        P9_DPRINTK(P9_DEBUG_VFS, " %p\n", s);
 
-       v9fs_dentry_release(s->s_root); /* clunk root */
+       if (s->s_root)
+               v9fs_dentry_release(s->s_root); /* clunk root */
 
        kill_anon_super(s);