Skip to content

Commit b24aa14

Browse files
Wen GuPaolo Abeni
authored andcommitted
net/smc: Scan from current RMB list when no position specified
When finding the first RMB of link group, it should start from the current RMB list whose index is 0. So fix it. Fixes: b4ba465 ("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>
1 parent 020c69c commit b24aa14

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

net/smc/smc_llc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,10 @@ static struct smc_buf_desc *smc_llc_get_next_rmb(struct smc_link_group *lgr,
578578
{
579579
struct smc_buf_desc *buf_next;
580580

581-
if (!buf_pos || list_is_last(&buf_pos->list, &lgr->rmbs[*buf_lst])) {
581+
if (!buf_pos)
582+
return _smc_llc_get_next_rmb(lgr, buf_lst);
583+
584+
if (list_is_last(&buf_pos->list, &lgr->rmbs[*buf_lst])) {
582585
(*buf_lst)++;
583586
return _smc_llc_get_next_rmb(lgr, buf_lst);
584587
}

0 commit comments

Comments
 (0)