Skip to content

Commit b83b279

Browse files
slowfranklinsmfrench
authored andcommitted
ksmbd: use ksmbd_req_buf_next() in ksmbd_smb2_check_message()
Use ksmbd_req_buf_next() in ksmbd_smb2_check_message(). Cc: Tom Talpey <[email protected]> Cc: Ronnie Sahlberg <[email protected]> Cc: Steve French <[email protected]> Cc: Hyunchul Lee <[email protected]> Acked-by: Namjae Jeon <[email protected]> Signed-off-by: Ralph Boehme <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent a088ac8 commit b83b279

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

fs/ksmbd/smb2misc.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,17 +347,12 @@ static int smb2_validate_credit_charge(struct ksmbd_conn *conn,
347347

348348
int ksmbd_smb2_check_message(struct ksmbd_work *work)
349349
{
350-
struct smb2_pdu *pdu = work->request_buf;
350+
struct smb2_pdu *pdu = ksmbd_req_buf_next(work);
351351
struct smb2_hdr *hdr = &pdu->hdr;
352352
int command;
353353
__u32 clc_len; /* calculated length */
354354
__u32 len = get_rfc1002_len(pdu);
355355

356-
if (work->next_smb2_rcv_hdr_off) {
357-
pdu = ksmbd_req_buf_next(work);
358-
hdr = &pdu->hdr;
359-
}
360-
361356
if (le32_to_cpu(hdr->NextCommand) > 0) {
362357
len = le32_to_cpu(hdr->NextCommand);
363358
} else if (work->next_smb2_rcv_hdr_off) {

0 commit comments

Comments
 (0)