Skip to content

Commit 341b160

Browse files
slowfranklinsmfrench
authored andcommitted
ksmdb: use cmd helper variable in smb2_get_ksmbd_tcon()
Use cmd helper variable in smb2_get_ksmbd_tcon(). 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 b83b279 commit 341b160

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

fs/ksmbd/smb2pdu.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,13 @@ struct channel *lookup_chann_list(struct ksmbd_session *sess, struct ksmbd_conn
9494
int smb2_get_ksmbd_tcon(struct ksmbd_work *work)
9595
{
9696
struct smb2_hdr *req_hdr = work->request_buf;
97+
unsigned int cmd = le16_to_cpu(req_hdr->Command);
9798
int tree_id;
9899

99100
work->tcon = NULL;
100-
if (work->conn->ops->get_cmd_val(work) == SMB2_TREE_CONNECT_HE ||
101-
work->conn->ops->get_cmd_val(work) == SMB2_CANCEL_HE ||
102-
work->conn->ops->get_cmd_val(work) == SMB2_LOGOFF_HE) {
101+
if (cmd == SMB2_TREE_CONNECT_HE ||
102+
cmd == SMB2_CANCEL_HE ||
103+
cmd == SMB2_LOGOFF_HE) {
103104
ksmbd_debug(SMB, "skip to check tree connect request\n");
104105
return 0;
105106
}

0 commit comments

Comments
 (0)