lkml.org 
[lkml]   [2022]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net v3] net/smc: Reset conn->lgr when link group registration fails
From
Thanks for your suggestion.

On 2022/1/5 3:54 pm, dust.li wrote:

>> - if (rc)
>> + if (rc) {
>> + spin_lock_bh(lgr_lock);
>> + if (!list_empty(&lgr->list))
>> + list_del_init(&lgr->list);
>> + spin_unlock_bh(lgr_lock);
>> + __smc_lgr_terminate(lgr, true);
>
> What about adding a smc_lgr_terminate() wrapper and put list_del_init()
> and __smc_lgr_terminate() into it ?

Adding a new wrapper is a good idea. But I think the logic here is relatively simple.
So instead of wrapping them, I coded them like what smc_lgr_cleanup_early() does.

Thanks,
Wen Gu

>
>> goto out;
>> + }
>> }
>> conn->local_tx_ctrl.common.type = SMC_CDC_MSG_TYPE;
>> conn->local_tx_ctrl.len = SMC_WR_TX_SIZE;
>> --
>> 1.8.3.1

\
 
 \ /
  Last update: 2022-01-05 09:56    [W:1.055 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site