diff options
author | Steve French <sfrench@us.ibm.com> | 2006-03-03 05:43:49 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-03-03 05:43:49 -0500 |
commit | d7c8c94d3e4c1cab7feedbb34297caa5babe1a7f (patch) | |
tree | 33bb6afe2e239e83a7092eded715597a34efa206 /fs/cifs | |
parent | 083d3a2cff514c5301f3a043642940d4d5371b22 (diff) |
[CIFS] Fix slow oplock break response when mounts to different
servers have same tid and we try to match oplock break to wrong tid.
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifsproto.h | 2 | ||||
-rw-r--r-- | fs/cifs/connect.c | 2 | ||||
-rw-r--r-- | fs/cifs/misc.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index b866e3a7ba67..2879ba343ca7 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
@@ -52,7 +52,7 @@ extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *, | |||
52 | int * /* type of buf returned */ , const int long_op); | 52 | int * /* type of buf returned */ , const int long_op); |
53 | extern int checkSMBhdr(struct smb_hdr *smb, __u16 mid); | 53 | extern int checkSMBhdr(struct smb_hdr *smb, __u16 mid); |
54 | extern int checkSMB(struct smb_hdr *smb, __u16 mid, int length); | 54 | extern int checkSMB(struct smb_hdr *smb, __u16 mid, int length); |
55 | extern int is_valid_oplock_break(struct smb_hdr *smb); | 55 | extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info *); |
56 | extern int is_size_safe_to_change(struct cifsInodeInfo *); | 56 | extern int is_size_safe_to_change(struct cifsInodeInfo *); |
57 | extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *); | 57 | extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *); |
58 | extern unsigned int smbCalcSize(struct smb_hdr *ptr); | 58 | extern unsigned int smbCalcSize(struct smb_hdr *ptr); |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 3651deca4f24..0b86d5ca9014 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -630,7 +630,7 @@ multi_t2_fnd: | |||
630 | smallbuf = NULL; | 630 | smallbuf = NULL; |
631 | } | 631 | } |
632 | wake_up_process(task_to_wake); | 632 | wake_up_process(task_to_wake); |
633 | } else if ((is_valid_oplock_break(smb_buffer) == FALSE) | 633 | } else if ((is_valid_oplock_break(smb_buffer, server) == FALSE) |
634 | && (isMultiRsp == FALSE)) { | 634 | && (isMultiRsp == FALSE)) { |
635 | cERROR(1, ("No task to wake, unknown frame rcvd!")); | 635 | cERROR(1, ("No task to wake, unknown frame rcvd!")); |
636 | cifs_dump_mem("Received Data is: ",(char *)smb_buffer, | 636 | cifs_dump_mem("Received Data is: ",(char *)smb_buffer, |
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 5d2fd70b50f8..fafd056426e4 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -481,7 +481,7 @@ checkSMB(struct smb_hdr *smb, __u16 mid, int length) | |||
481 | return 0; | 481 | return 0; |
482 | } | 482 | } |
483 | int | 483 | int |
484 | is_valid_oplock_break(struct smb_hdr *buf) | 484 | is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) |
485 | { | 485 | { |
486 | struct smb_com_lock_req * pSMB = (struct smb_com_lock_req *)buf; | 486 | struct smb_com_lock_req * pSMB = (struct smb_com_lock_req *)buf; |
487 | struct list_head *tmp; | 487 | struct list_head *tmp; |
@@ -541,7 +541,7 @@ is_valid_oplock_break(struct smb_hdr *buf) | |||
541 | read_lock(&GlobalSMBSeslock); | 541 | read_lock(&GlobalSMBSeslock); |
542 | list_for_each(tmp, &GlobalTreeConnectionList) { | 542 | list_for_each(tmp, &GlobalTreeConnectionList) { |
543 | tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList); | 543 | tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList); |
544 | if (tcon->tid == buf->Tid) { | 544 | if ((tcon->tid == buf->Tid) && (srv == tcon->ses->server)) { |
545 | cifs_stats_inc(&tcon->num_oplock_brks); | 545 | cifs_stats_inc(&tcon->num_oplock_brks); |
546 | list_for_each(tmp1,&tcon->openFileList){ | 546 | list_for_each(tmp1,&tcon->openFileList){ |
547 | netfile = list_entry(tmp1,struct cifsFileInfo, | 547 | netfile = list_entry(tmp1,struct cifsFileInfo, |