aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorSteve French <smfrench@austin.rr.com>2005-04-29 01:41:09 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-29 01:41:09 -0400
commit46810cbf3d951c1ce8ce3311639996ad43ca4ed1 (patch)
tree3b8a7cf7a9528501b0e3d72ccc8cbd384fd88b3a /fs/cifs/cifssmb.c
parent79944bf71352f33f984ac3973b159b5c2cee139d (diff)
[PATCH] cifs: Ease memory pressure, do not use large buffers in byte range lock requests.
Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 834297f7b5e1..a6e66974b286 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -1023,11 +1023,13 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
1023 __u16 count; 1023 __u16 count;
1024 1024
1025 cFYI(1, ("In CIFSSMBLock - timeout %d numLock %d",waitFlag,numLock)); 1025 cFYI(1, ("In CIFSSMBLock - timeout %d numLock %d",waitFlag,numLock));
1026 rc = smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB, 1026 rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB);
1027 (void **) &pSMBr); 1027
1028 if (rc) 1028 if (rc)
1029 return rc; 1029 return rc;
1030 1030
1031 pSMBr = (LOCK_RSP *)pSMB; /* BB removeme BB */
1032
1031 if(lockType == LOCKING_ANDX_OPLOCK_RELEASE) { 1033 if(lockType == LOCKING_ANDX_OPLOCK_RELEASE) {
1032 timeout = -1; /* no response expected */ 1034 timeout = -1; /* no response expected */
1033 pSMB->Timeout = 0; 1035 pSMB->Timeout = 0;
@@ -1065,7 +1067,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
1065 if (rc) { 1067 if (rc) {
1066 cFYI(1, ("Send error in Lock = %d", rc)); 1068 cFYI(1, ("Send error in Lock = %d", rc));
1067 } 1069 }
1068 cifs_buf_release(pSMB); 1070 cifs_small_buf_release(pSMB);
1069 1071
1070 /* Note: On -EAGAIN error only caller can retry on handle based calls 1072 /* Note: On -EAGAIN error only caller can retry on handle based calls
1071 since file handle passed in no longer valid */ 1073 since file handle passed in no longer valid */