diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-10-19 15:27:00 +0200 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-10-20 09:15:57 -0400 |
commit | bbbe4512735eb0f15f09ffd14876091a8e91bc69 (patch) | |
tree | 2acdac2f4030c4d58fe6166d07bc96f68a5cd136 /fs | |
parent | 348acd48f050f5ba7fa917b1421ae34443be97dd (diff) | |
download | op-kernel-dev-bbbe4512735eb0f15f09ffd14876091a8e91bc69.zip op-kernel-dev-bbbe4512735eb0f15f09ffd14876091a8e91bc69.tar.gz |
[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')
-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 e99444d..882873a 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, fs_err(sdp, "can't get root dentry\n"); error = -ENOMEM; iput(inode); - } - new->s_root->d_op = &gfs2_dops; + } else + new->s_root->d_op = &gfs2_dops; return error; } |