diff options
author | Ralph Boehme <slow@samba.org> | 2021-10-05 08:03:40 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-11-07 07:52:06 +0300 |
commit | 341b16014bf871115f0883e831372c4b76389d03 (patch) | |
tree | ebe88cbf2e2a31848a19cad46d38f12029f6e8b6 /fs | |
parent | b83b27909e74d27796de19c802fbc3b65ab4ba9a (diff) | |
download | linux-341b16014bf871115f0883e831372c4b76389d03.tar.xz |
ksmdb: use cmd helper variable in smb2_get_ksmbd_tcon()
Use cmd helper variable in smb2_get_ksmbd_tcon().
Cc: Tom Talpey <tom@talpey.com>
Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Cc: Steve French <smfrench@gmail.com>
Cc: Hyunchul Lee <hyc.lee@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ksmbd/smb2pdu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/ksmbd/smb2pdu.c b/fs/ksmbd/smb2pdu.c index 7e448df3f847..eb23c44c1c85 100644 --- a/fs/ksmbd/smb2pdu.c +++ b/fs/ksmbd/smb2pdu.c @@ -94,12 +94,13 @@ struct channel *lookup_chann_list(struct ksmbd_session *sess, struct ksmbd_conn int smb2_get_ksmbd_tcon(struct ksmbd_work *work) { struct smb2_hdr *req_hdr = work->request_buf; + unsigned int cmd = le16_to_cpu(req_hdr->Command); int tree_id; work->tcon = NULL; - if (work->conn->ops->get_cmd_val(work) == SMB2_TREE_CONNECT_HE || - work->conn->ops->get_cmd_val(work) == SMB2_CANCEL_HE || - work->conn->ops->get_cmd_val(work) == SMB2_LOGOFF_HE) { + if (cmd == SMB2_TREE_CONNECT_HE || + cmd == SMB2_CANCEL_HE || + cmd == SMB2_LOGOFF_HE) { ksmbd_debug(SMB, "skip to check tree connect request\n"); return 0; } |