예제 #1
0
파일: iser_verbs.c 프로젝트: 710leo/LVS
/**
 * Frees all conn objects and deallocs conn descriptor
 */
static void iser_conn_release(struct iser_conn *ib_conn, int can_destroy_id)
{
	struct iser_device  *device = ib_conn->device;

	BUG_ON(ib_conn->state != ISER_CONN_DOWN);

	mutex_lock(&ig.connlist_mutex);
	list_del(&ib_conn->conn_list);
	mutex_unlock(&ig.connlist_mutex);
	iser_free_rx_descriptors(ib_conn);
	iser_free_ib_conn_res(ib_conn, can_destroy_id);
	ib_conn->device = NULL;
	/* on EVENT_ADDR_ERROR there's no device yet for this conn */
	if (device != NULL)
		iser_device_try_release(device);
	iscsi_destroy_endpoint(ib_conn->ep);
}
예제 #2
0
static void iser_conn_release(struct iser_conn *ib_conn)
{
	struct iser_device  *device = ib_conn->device;

	BUG_ON(ib_conn->state != ISER_CONN_DOWN);

	mutex_lock(&ig.connlist_mutex);
	list_del(&ib_conn->conn_list);
	mutex_unlock(&ig.connlist_mutex);

	iser_free_ib_conn_res(ib_conn);
	ib_conn->device = NULL;
	
	if (device != NULL)
		iser_device_try_release(device);
	if (ib_conn->iser_conn)
		ib_conn->iser_conn->ib_conn = NULL;
	iscsi_destroy_endpoint(ib_conn->ep);
}
예제 #3
0
파일: iser_verbs.c 프로젝트: 274914765/C
/**
 * Frees all conn objects and deallocs conn descriptor
 */
static void iser_conn_release(struct iser_conn *ib_conn)
{
    struct iser_device  *device = ib_conn->device;

    BUG_ON(ib_conn->state != ISER_CONN_DOWN);

    mutex_lock(&ig.connlist_mutex);
    list_del(&ib_conn->conn_list);
    mutex_unlock(&ig.connlist_mutex);

    iser_free_ib_conn_res(ib_conn);
    ib_conn->device = NULL;
    /* on EVENT_ADDR_ERROR there's no device yet for this conn */
    if (device != NULL)
        iser_device_try_release(device);
    if (ib_conn->iser_conn)
        ib_conn->iser_conn->ib_conn = NULL;
    kfree(ib_conn);
}