Loading fs/cifs/cifsproto.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -52,7 +52,7 @@ extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *, int * /* type of buf returned */ , const int long_op); int * /* type of buf returned */ , const int long_op); extern int checkSMBhdr(struct smb_hdr *smb, __u16 mid); extern int checkSMBhdr(struct smb_hdr *smb, __u16 mid); extern int checkSMB(struct smb_hdr *smb, __u16 mid, int length); extern int checkSMB(struct smb_hdr *smb, __u16 mid, int length); extern int is_valid_oplock_break(struct smb_hdr *smb); extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info *); extern int is_size_safe_to_change(struct cifsInodeInfo *); extern int is_size_safe_to_change(struct cifsInodeInfo *); extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *); extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *); extern unsigned int smbCalcSize(struct smb_hdr *ptr); extern unsigned int smbCalcSize(struct smb_hdr *ptr); Loading fs/cifs/connect.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -630,7 +630,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) smallbuf = NULL; smallbuf = NULL; } } wake_up_process(task_to_wake); wake_up_process(task_to_wake); } else if ((is_valid_oplock_break(smb_buffer) == FALSE) } else if ((is_valid_oplock_break(smb_buffer, server) == FALSE) && (isMultiRsp == FALSE)) { && (isMultiRsp == FALSE)) { cERROR(1, ("No task to wake, unknown frame rcvd!")); cERROR(1, ("No task to wake, unknown frame rcvd!")); cifs_dump_mem("Received Data is: ",(char *)smb_buffer, cifs_dump_mem("Received Data is: ",(char *)smb_buffer, Loading fs/cifs/misc.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -481,7 +481,7 @@ checkSMB(struct smb_hdr *smb, __u16 mid, int length) return 0; return 0; } } int int is_valid_oplock_break(struct smb_hdr *buf) is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) { { struct smb_com_lock_req * pSMB = (struct smb_com_lock_req *)buf; struct smb_com_lock_req * pSMB = (struct smb_com_lock_req *)buf; struct list_head *tmp; struct list_head *tmp; Loading Loading @@ -541,7 +541,7 @@ is_valid_oplock_break(struct smb_hdr *buf) read_lock(&GlobalSMBSeslock); read_lock(&GlobalSMBSeslock); list_for_each(tmp, &GlobalTreeConnectionList) { list_for_each(tmp, &GlobalTreeConnectionList) { tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList); tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList); if (tcon->tid == buf->Tid) { if ((tcon->tid == buf->Tid) && (srv == tcon->ses->server)) { cifs_stats_inc(&tcon->num_oplock_brks); cifs_stats_inc(&tcon->num_oplock_brks); list_for_each(tmp1,&tcon->openFileList){ list_for_each(tmp1,&tcon->openFileList){ netfile = list_entry(tmp1,struct cifsFileInfo, netfile = list_entry(tmp1,struct cifsFileInfo, Loading Loading
fs/cifs/cifsproto.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -52,7 +52,7 @@ extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *, int * /* type of buf returned */ , const int long_op); int * /* type of buf returned */ , const int long_op); extern int checkSMBhdr(struct smb_hdr *smb, __u16 mid); extern int checkSMBhdr(struct smb_hdr *smb, __u16 mid); extern int checkSMB(struct smb_hdr *smb, __u16 mid, int length); extern int checkSMB(struct smb_hdr *smb, __u16 mid, int length); extern int is_valid_oplock_break(struct smb_hdr *smb); extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info *); extern int is_size_safe_to_change(struct cifsInodeInfo *); extern int is_size_safe_to_change(struct cifsInodeInfo *); extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *); extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *); extern unsigned int smbCalcSize(struct smb_hdr *ptr); extern unsigned int smbCalcSize(struct smb_hdr *ptr); Loading
fs/cifs/connect.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -630,7 +630,7 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) smallbuf = NULL; smallbuf = NULL; } } wake_up_process(task_to_wake); wake_up_process(task_to_wake); } else if ((is_valid_oplock_break(smb_buffer) == FALSE) } else if ((is_valid_oplock_break(smb_buffer, server) == FALSE) && (isMultiRsp == FALSE)) { && (isMultiRsp == FALSE)) { cERROR(1, ("No task to wake, unknown frame rcvd!")); cERROR(1, ("No task to wake, unknown frame rcvd!")); cifs_dump_mem("Received Data is: ",(char *)smb_buffer, cifs_dump_mem("Received Data is: ",(char *)smb_buffer, Loading
fs/cifs/misc.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -481,7 +481,7 @@ checkSMB(struct smb_hdr *smb, __u16 mid, int length) return 0; return 0; } } int int is_valid_oplock_break(struct smb_hdr *buf) is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) { { struct smb_com_lock_req * pSMB = (struct smb_com_lock_req *)buf; struct smb_com_lock_req * pSMB = (struct smb_com_lock_req *)buf; struct list_head *tmp; struct list_head *tmp; Loading Loading @@ -541,7 +541,7 @@ is_valid_oplock_break(struct smb_hdr *buf) read_lock(&GlobalSMBSeslock); read_lock(&GlobalSMBSeslock); list_for_each(tmp, &GlobalTreeConnectionList) { list_for_each(tmp, &GlobalTreeConnectionList) { tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList); tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList); if (tcon->tid == buf->Tid) { if ((tcon->tid == buf->Tid) && (srv == tcon->ses->server)) { cifs_stats_inc(&tcon->num_oplock_brks); cifs_stats_inc(&tcon->num_oplock_brks); list_for_each(tmp1,&tcon->openFileList){ list_for_each(tmp1,&tcon->openFileList){ netfile = list_entry(tmp1,struct cifsFileInfo, netfile = list_entry(tmp1,struct cifsFileInfo, Loading