[GFS2] fixed a NULL pointer assignment BUG
authorDenis Cheng <crquan@gmail.com>
Wed, 15 Aug 2007 15:54:44 +0000 (23:54 +0800)
committerSteven Whitehouse <swhiteho@redhat.com>
Wed, 10 Oct 2007 07:55:24 +0000 (08:55 +0100)
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/ops_fstype.c

index 6c820cb23473b8492e1fc9a41316618323477de6..c1c6672ebb8377c537abaa3c48d34da7c6365d79 100644 (file)
@@ -292,8 +292,9 @@ static int init_sb(struct gfs2_sbd *sdp, int silent, int undo)
                fs_err(sdp, "can't get root dentry\n");
                error = -ENOMEM;
                iput(inode);
-       }
-       sb->s_root->d_op = &gfs2_dops;
+       } else
+               sb->s_root->d_op = &gfs2_dops;
+       
 out:
        gfs2_glock_dq_uninit(&sb_gh);
        return error;