FreeBSD/sys/dev/iser/iser_verbs.c
/* if there's no demand for this device, release it */
if there's no demand for this device, release it
if there ' s no demand for this device release it
static void
iser_device_try_release(struct iser_device *device)
{
	sx_xlock(&ig.device_list_mutex);
	device->refcount--;
	ISER_INFO("device %p refcount %d", device, device->refcount);
	if (!device->refcount) {
		iser_free_device_ib_res(device);
		list_del(&device->ig_list);
		free(device, M_ISER_VERBS);
		device = NULL;
	}
	sx_xunlock(&ig.device_list_mutex);
}
static void iser_device_try_release ( struct iser_device * device ) { sx_xlock ( & ig . device_list_mutex ) ; device -> refcount -- ; ISER_INFO ( " " , device , device -> refcount ) ; if ( ! device -> refcount ) { iser_free_device_ib_res ( device ) ; list_del ( & device -> ig_list ) ; free ( device , M_ISER_VERBS ) ; device = NULL ; } sx_xunlock ( & ig . device_list_mutex ) ; }
if there's no demand for this device, release it
if there ' s no demand for this device release it