summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-10-19 15:27:00 +0200
committerSteven Whitehouse <swhiteho@redhat.com>2006-10-20 09:15:57 -0400
commitbbbe4512735eb0f15f09ffd14876091a8e91bc69 (patch)
tree2acdac2f4030c4d58fe6166d07bc96f68a5cd136 /fs
parent348acd48f050f5ba7fa917b1421ae34443be97dd (diff)
downloadblackbird-op-linux-bbbe4512735eb0f15f09ffd14876091a8e91bc69.tar.gz
blackbird-op-linux-bbbe4512735eb0f15f09ffd14876091a8e91bc69.zip
[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.c4
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,
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;
}
OpenPOWER on IntegriCloud