diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-10-19 09:27:00 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-10-20 09:15:57 -0400 |
commit | bbbe4512735eb0f15f09ffd14876091a8e91bc69 (patch) | |
tree | 2acdac2f4030c4d58fe6166d07bc96f68a5cd136 /fs/gfs2 | |
parent | 348acd48f050f5ba7fa917b1421ae34443be97dd (diff) |
[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: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/ops_fstype.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index e99444dffeb8..882873a6bd69 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c | |||
@@ -794,8 +794,8 @@ static int fill_super_meta(struct super_block *sb, struct super_block *new, | |||
794 | fs_err(sdp, "can't get root dentry\n"); | 794 | fs_err(sdp, "can't get root dentry\n"); |
795 | error = -ENOMEM; | 795 | error = -ENOMEM; |
796 | iput(inode); | 796 | iput(inode); |
797 | } | 797 | } else |
798 | new->s_root->d_op = &gfs2_dops; | 798 | new->s_root->d_op = &gfs2_dops; |
799 | 799 | ||
800 | return error; | 800 | return error; |
801 | } | 801 | } |