Skip to contentSkip to conversation

gfs2: fixed a NULL pointer assignment BUG

PATCH In review Denis Cheng 2 participants 2 messages Aug 15, 2007 GFS2 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gfs2: fixed a NULL pointer assignment BUG

---
 fs/gfs2/ops_fstype.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
fs/gfs2/ops_fstype.c +3 -2
index cf5aa50..67e2d43 100644
@@ -301,8 +301,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;
Signature · 1 line
1.5.3.rc4
#1 lore raw

Hi,

Now in the GFS2 -nmw git tree. Thanks,

Steve.

Quoted 21 lines · Denis Cheng
---
 fs/gfs2/ops_fstype.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
fs/gfs2/ops_fstype.c +3 -2
index cf5aa50..67e2d43 100644
@@ -301,8 +301,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;