svn commit: linux-cifs-client r53 - in
branches/linux-converged-for-old-kernels/fs/cifs: .
jra at samba.org
jra at samba.org
Fri Jul 14 01:07:07 GMT 2006
Author: jra
Date: 2006-07-14 01:07:07 +0000 (Fri, 14 Jul 2006)
New Revision: 53
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=53
Log:
Add in POSIX lock infinite timeout change.
Jeremy.
Modified:
branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c 2006-07-13 22:30:56 UTC (rev 52)
+++ branches/linux-converged-for-old-kernels/fs/cifs/cifssmb.c 2006-07-14 01:07:07 UTC (rev 53)
@@ -1495,6 +1495,7 @@
struct cifs_posix_lock *parm_data;
int rc = 0;
int bytes_returned = 0;
+ int timeout = 0;
__u16 params, param_offset, offset, byte_count, count;
cFYI(1, ("Posix Lock"));
@@ -1539,8 +1540,11 @@
(((char *) &pSMB->hdr.Protocol) + offset);
parm_data->lock_type = cpu_to_le16(lock_type);
- if(waitFlag)
+ if(waitFlag) {
+ timeout = 3; /* blocking operation, no timeout */
+ pSMB->Timeout = cpu_to_le32(-1);/* blocking - do not time out */
parm_data->lock_flags = cpu_to_le16(1);
+ }
parm_data->pid = cpu_to_le32(current->tgid);
parm_data->start = cpu_to_le64(pLockData->fl_start);
parm_data->length = cpu_to_le64(len); /* normalize negative numbers */
@@ -1552,7 +1556,7 @@
pSMB->hdr.smb_buf_length += byte_count;
pSMB->ByteCount = cpu_to_le16(byte_count);
rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
- (struct smb_hdr *) pSMBr, &bytes_returned, 0);
+ (struct smb_hdr *) pSMBr, &bytes_returned, timeout);
if (rc) {
cFYI(1, ("Send error in Posix Lock = %d", rc));
} else if (get_flag) {
More information about the samba-cvs
mailing list