diff options
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, direntry->d_op = &cifs_dentry_ops; d_instantiate(direntry, newinode); } - if ((nd->flags & LOOKUP_OPEN) == FALSE) { + if ((nd == NULL /* nfsd case - nfs srv does not set nd */) || + ((nd->flags & LOOKUP_OPEN) == FALSE)) { /* mknod case - do not leave file open */ CIFSSMBClose(xid, pTcon, fileHandle); } else if (newinode) { |