diff options
author | Steve French <sfrench@us.ibm.com> | 2007-07-11 14:30:34 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-07-11 14:30:34 -0400 |
commit | 7521a3c566dda7bb09576975324fc0a08a79ad14 (patch) | |
tree | 2ba0405ea1a7f3f187c2434ef86000b1b65f2d01 /fs/cifs/dir.c | |
parent | fb8c4b14d9259ba467241a7aaeb712caedce7ee8 (diff) |
[CIFS] Fix oops in cifs_create when nfsd server exports cifs mount
nfsd is passing null nameidata (probably the only one doing that)
on call to create - cifs was missing one check for this.
Note that running nfsd over a cifs mount requires specifying fsid on
the nfs exports entry and requires mounting cifs with serverino mount
option.
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r-- | fs/cifs/dir.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 38706e8496a3..def89f23fe55 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -264,7 +264,8 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
264 | direntry->d_op = &cifs_dentry_ops; | 264 | direntry->d_op = &cifs_dentry_ops; |
265 | d_instantiate(direntry, newinode); | 265 | d_instantiate(direntry, newinode); |
266 | } | 266 | } |
267 | if ((nd->flags & LOOKUP_OPEN) == FALSE) { | 267 | if ((nd == NULL /* nfsd case - nfs srv does not set nd */) || |
268 | ((nd->flags & LOOKUP_OPEN) == FALSE)) { | ||
268 | /* mknod case - do not leave file open */ | 269 | /* mknod case - do not leave file open */ |
269 | CIFSSMBClose(xid, pTcon, fileHandle); | 270 | CIFSSMBClose(xid, pTcon, fileHandle); |
270 | } else if (newinode) { | 271 | } else if (newinode) { |