Commit bbbe4512 authored by Adrian Bunk's avatar Adrian Bunk Committed by Steven Whitehouse

[GFS2] fs/gfs2/ops_fstype.c:fill_super_meta(): fix NULL dereference

Don't dereference new->s_root when we do know it's NULL.

Spotted by the Coverity checker.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 348acd48
...@@ -794,7 +794,7 @@ static int fill_super_meta(struct super_block *sb, struct super_block *new, ...@@ -794,7 +794,7 @@ static int fill_super_meta(struct super_block *sb, struct super_block *new,
fs_err(sdp, "can't get root dentry\n"); fs_err(sdp, "can't get root dentry\n");
error = -ENOMEM; error = -ENOMEM;
iput(inode); iput(inode);
} } else
new->s_root->d_op = &gfs2_dops; new->s_root->d_op = &gfs2_dops;
return error; return error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment