diff options
author | Zhengchao Shao <shaozhengchao@huawei.com> | 2024-07-30 09:25:05 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-07-31 11:48:58 +0100 |
commit | d37307eaac13f3c5fe912787b5f9facbc574f2cf (patch) | |
tree | 62f7df6eabc832ffb10da160911cf3aaa51a33e9 /net/smc | |
parent | 5a79575711264b98b435e08107c9e5bf129df210 (diff) | |
download | linux-stable-d37307eaac13f3c5fe912787b5f9facbc574f2cf.tar.gz linux-stable-d37307eaac13f3c5fe912787b5f9facbc574f2cf.tar.bz2 linux-stable-d37307eaac13f3c5fe912787b5f9facbc574f2cf.zip |
net/smc: remove redundant code in smc_connect_check_aclc
When the SMC client perform CLC handshake, it will check whether
the clc header type is correct in receiving SMC_CLC_ACCEPT packet.
The specific invoking path is as follows:
__smc_connect
smc_connect_clc
smc_clc_wait_msg
smc_clc_msg_hdr_valid
smc_clc_msg_acc_conf_valid
Therefore, the smc_connect_check_aclc interface invoked by
__smc_connect does not need to check type again.
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc')
-rw-r--r-- | net/smc/af_smc.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 83f5a1849971..6f82e4d8fda4 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -1466,10 +1466,6 @@ connect_abort: static int smc_connect_check_aclc(struct smc_init_info *ini, struct smc_clc_msg_accept_confirm *aclc) { - if (aclc->hdr.typev1 != SMC_TYPE_R && - aclc->hdr.typev1 != SMC_TYPE_D) - return SMC_CLC_DECL_MODEUNSUPP; - if (aclc->hdr.version >= SMC_V2) { if ((aclc->hdr.typev1 == SMC_TYPE_R && !smcr_indicated(ini->smc_type_v2)) || |