/* remove a finished connection from its link group */ void smc_conn_free(struct smc_connection *conn) { if (!conn->lgr) return; smc_cdc_tx_dismiss_slots(conn); smc_lgr_unregister_conn(conn); smc_buf_unuse(conn); }
/* remove a finished connection from its link group */ void smc_conn_free(struct smc_connection *conn) { struct smc_link_group *lgr = conn->lgr; if (!lgr) return; if (lgr->is_smcd) { smc_ism_unset_conn(conn); tasklet_kill(&conn->rx_tsklet); } else { smc_cdc_tx_dismiss_slots(conn); } smc_lgr_unregister_conn(conn); /* unsets conn->lgr */ smc_buf_unuse(conn, lgr); /* allow buffer reuse */ if (!lgr->conns_num) smc_lgr_schedule_free_work(lgr); }