aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.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/file.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/file.c')
-rw-r--r--fs/cifs/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index fa849c91d323..40b690073fc1 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -145,7 +145,7 @@ client_can_cache:
145 full_path, inode->i_sb, xid); 145 full_path, inode->i_sb, xid);
146 else 146 else
147 rc = cifs_get_inode_info(&file->f_path.dentry->d_inode, 147 rc = cifs_get_inode_info(&file->f_path.dentry->d_inode,
148 full_path, buf, inode->i_sb, xid); 148 full_path, buf, inode->i_sb, xid, NULL);
149 149
150 if ((*oplock & 0xF) == OPLOCK_EXCLUSIVE) { 150 if ((*oplock & 0xF) == OPLOCK_EXCLUSIVE) {
151 pCifsInode->clientCanCacheAll = TRUE; 151 pCifsInode->clientCanCacheAll = TRUE;
@@ -440,7 +440,7 @@ reopen_error_exit:
440 else 440 else
441 rc = cifs_get_inode_info(&inode, 441 rc = cifs_get_inode_info(&inode,
442 full_path, NULL, inode->i_sb, 442 full_path, NULL, inode->i_sb,
443 xid); 443 xid, NULL);
444 } /* else we are writing out data to server already 444 } /* else we are writing out data to server already
445 and could deadlock if we tried to flush data, and 445 and could deadlock if we tried to flush data, and
446 since we do not know if we have data that would 446 since we do not know if we have data that would