Re: [PATCH net v3] net/smc: Reset conn->lgr when link group registration fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux