aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r--fs/cifs/dir.c3
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) {