aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/dir.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-03-14 18:37:16 -0400
committerSteve French <sfrench@us.ibm.com>2008-03-14 18:37:16 -0400
commit8b1327f6ed957030a64ccdb17131955bfea2d3fe (patch)
tree075ff00b4c333ef333aff5927eac45bde16d8d53 /fs/cifs/dir.c
parentebe8912be214662c8289977fb416c1f015df4a0b (diff)
[CIFS] file create with acl support enabled is slow
Shirish Pargaonkar noted: With cifsacl mount option, when a file is created on the Windows server, exclusive oplock is broken right away because the get cifs acl code again opens the file to obtain security descriptor. The client does not have the newly created file handle or inode in any of its lists yet so it does not respond to oplock break and server waits for its duration and then responds to the second open. This slows down file creation signficantly. The fix is to pass the file descriptor to the get cifsacl code wherever available so that get cifs acl code does not send second open (NT Create ANDX) and oplock is not broken. CC: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r--fs/cifs/dir.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 4e83b47c4b34..0f5c62ba4038 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -229,7 +229,8 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
229 inode->i_sb, xid); 229 inode->i_sb, xid);
230 else { 230 else {
231 rc = cifs_get_inode_info(&newinode, full_path, 231 rc = cifs_get_inode_info(&newinode, full_path,
232 buf, inode->i_sb, xid); 232 buf, inode->i_sb, xid,
233 &fileHandle);
233 if (newinode) { 234 if (newinode) {
234 newinode->i_mode = mode; 235 newinode->i_mode = mode;
235 if ((oplock & CIFS_CREATE_ACTION) && 236 if ((oplock & CIFS_CREATE_ACTION) &&
@@ -483,7 +484,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
483 parent_dir_inode->i_sb, xid); 484 parent_dir_inode->i_sb, xid);
484 else 485 else
485 rc = cifs_get_inode_info(&newInode, full_path, NULL, 486 rc = cifs_get_inode_info(&newInode, full_path, NULL,
486 parent_dir_inode->i_sb, xid); 487 parent_dir_inode->i_sb, xid, NULL);
487 488
488 if ((rc == 0) && (newInode != NULL)) { 489 if ((rc == 0) && (newInode != NULL)) {
489 if (pTcon->nocase) 490 if (pTcon->nocase)