diff options
author | Pavel Shilovsky <piastry@etersoft.ru> | 2012-03-23 14:28:02 -0400 |
---|---|---|
committer | Jeff Layton <jlayton@redhat.com> | 2012-03-23 14:28:02 -0400 |
commit | d4e4854fd1c85ac8ba4d6de39703e07704754b85 (patch) | |
tree | 96cbc43691d2bbef4a03087a3d1ac8c26ffff827 /fs/cifs/misc.c | |
parent | 792af7b05b8a78def080ec757a4d4420b9fd0cc2 (diff) |
CIFS: Separate protocol-specific code from demultiplex code
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Diffstat (limited to 'fs/cifs/misc.c')
-rw-r--r-- | fs/cifs/misc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index e88601fc6f22..dc61dff2c42a 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -420,8 +420,10 @@ check_smb_hdr(struct smb_hdr *smb, __u16 mid) | |||
420 | } | 420 | } |
421 | 421 | ||
422 | int | 422 | int |
423 | checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int total_read) | 423 | checkSMB(char *buf, unsigned int total_read) |
424 | { | 424 | { |
425 | struct smb_hdr *smb = (struct smb_hdr *)buf; | ||
426 | __u16 mid = smb->Mid; | ||
425 | __u32 rfclen = be32_to_cpu(smb->smb_buf_length); | 427 | __u32 rfclen = be32_to_cpu(smb->smb_buf_length); |
426 | __u32 clc_len; /* calculated length */ | 428 | __u32 clc_len; /* calculated length */ |
427 | cFYI(0, "checkSMB Length: 0x%x, smb_buf_length: 0x%x", | 429 | cFYI(0, "checkSMB Length: 0x%x, smb_buf_length: 0x%x", |
@@ -502,8 +504,9 @@ checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int total_read) | |||
502 | } | 504 | } |
503 | 505 | ||
504 | bool | 506 | bool |
505 | is_valid_oplock_break(struct smb_hdr *buf, struct TCP_Server_Info *srv) | 507 | is_valid_oplock_break(char *buffer, struct TCP_Server_Info *srv) |
506 | { | 508 | { |
509 | struct smb_hdr *buf = (struct smb_hdr *)buffer; | ||
507 | struct smb_com_lock_req *pSMB = (struct smb_com_lock_req *)buf; | 510 | struct smb_com_lock_req *pSMB = (struct smb_com_lock_req *)buf; |
508 | struct list_head *tmp, *tmp1, *tmp2; | 511 | struct list_head *tmp, *tmp1, *tmp2; |
509 | struct cifs_ses *ses; | 512 | struct cifs_ses *ses; |