Commit e333e800 authored by Steve French's avatar Steve French Committed by Steve French

Oplock flag reversed in create path

parent ca84b31a
...@@ -125,7 +125,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, ...@@ -125,7 +125,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
{ {
int rc = -ENOENT; int rc = -ENOENT;
int xid; int xid;
int oplock = REQ_OPLOCK; int oplock = 0;
int desiredAccess = GENERIC_ALL; int desiredAccess = GENERIC_ALL;
__u16 fileHandle; __u16 fileHandle;
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb;
...@@ -155,7 +155,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, ...@@ -155,7 +155,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
} }
/* BB add processing to set equivalent of mode - e.g. via CreateX with ACLs */ /* BB add processing to set equivalent of mode - e.g. via CreateX with ACLs */
if (!oplockEnabled) if (oplockEnabled)
oplock = REQ_OPLOCK; oplock = REQ_OPLOCK;
buf = kmalloc(sizeof(FILE_ALL_INFO),GFP_KERNEL); buf = kmalloc(sizeof(FILE_ALL_INFO),GFP_KERNEL);
...@@ -195,7 +195,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, ...@@ -195,7 +195,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
write_lock(&GlobalSMBSeslock); write_lock(&GlobalSMBSeslock);
list_add(&pCifsFile->tlist,&pTcon->openFileList); list_add(&pCifsFile->tlist,&pTcon->openFileList);
pCifsInode = CIFS_I(newinode); pCifsInode = CIFS_I(newinode);
if(pCifsInode->openFileList.next) if(pCifsInode)
list_add(&pCifsFile->flist,&pCifsInode->openFileList); list_add(&pCifsFile->flist,&pCifsInode->openFileList);
write_unlock(&GlobalSMBSeslock); write_unlock(&GlobalSMBSeslock);
if (cifs_sb->tcon->ses->capabilities & CAP_UNIX) if (cifs_sb->tcon->ses->capabilities & CAP_UNIX)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment