Skip to content

Commit

Permalink
[GFS2] GFS2 not checking pointer on create when running under nfsd
Browse files Browse the repository at this point in the history
When looking at an unrelated problem, I noticed that nfsd does not
set nameidata pointer on create (ie nd is NULL).  This should
cause an oops in some cases in which when NFSd is mounted over GFS2.

Signed-off-by: Steve French <[email protected]>
Signed-off-by: Steven Whitehouse <[email protected]>
  • Loading branch information
smfrench authored and swhiteho committed Oct 10, 2007
1 parent aa0481e commit afd0942
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/gfs2/ops_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static int gfs2_create(struct inode *dir, struct dentry *dentry,
mark_inode_dirty(inode);
break;
} else if (PTR_ERR(inode) != -EEXIST ||
(nd->intent.open.flags & O_EXCL)) {
(nd && (nd->intent.open.flags & O_EXCL))) {
gfs2_holder_uninit(ghs);
return PTR_ERR(inode);
}
Expand Down

0 comments on commit afd0942

Please sign in to comment.