mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
net/smc: Scan from current RMB list when no position specified
[ Upstream commitb24aa141c2] When finding the first RMB of link group, it should start from the current RMB list whose index is 0. So fix it. Fixes:b4ba4652b3("net/smc: extend LLC layer for SMC-Rv2") Signed-off-by: Wen Gu <guwen@linux.alibaba.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
752836e1a2
commit
8c3ec8e789
@@ -578,7 +578,10 @@ static struct smc_buf_desc *smc_llc_get_next_rmb(struct smc_link_group *lgr,
|
||||
{
|
||||
struct smc_buf_desc *buf_next;
|
||||
|
||||
if (!buf_pos || list_is_last(&buf_pos->list, &lgr->rmbs[*buf_lst])) {
|
||||
if (!buf_pos)
|
||||
return _smc_llc_get_next_rmb(lgr, buf_lst);
|
||||
|
||||
if (list_is_last(&buf_pos->list, &lgr->rmbs[*buf_lst])) {
|
||||
(*buf_lst)++;
|
||||
return _smc_llc_get_next_rmb(lgr, buf_lst);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user