Deleted Added
full compact
ctl_backend_ramdisk.c (287621) ctl_backend_ramdisk.c (287670)
1/*-
2 * Copyright (c) 2003, 2008 Silicon Graphics International Corp.
3 * Copyright (c) 2012 The FreeBSD Foundation
4 * All rights reserved.
5 *
6 * Portions of this software were developed by Edward Tomasz Napierala
7 * under sponsorship from the FreeBSD Foundation.
8 *

--- 26 unchanged lines hidden (view full) ---

35 */
36/*
37 * CAM Target Layer backend for a "fake" ramdisk.
38 *
39 * Author: Ken Merry <ken@FreeBSD.org>
40 */
41
42#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003, 2008 Silicon Graphics International Corp.
3 * Copyright (c) 2012 The FreeBSD Foundation
4 * All rights reserved.
5 *
6 * Portions of this software were developed by Edward Tomasz Napierala
7 * under sponsorship from the FreeBSD Foundation.
8 *

--- 26 unchanged lines hidden (view full) ---

35 */
36/*
37 * CAM Target Layer backend for a "fake" ramdisk.
38 *
39 * Author: Ken Merry <ken@FreeBSD.org>
40 */
41
42#include <sys/cdefs.h>
43__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_backend_ramdisk.c 287621 2015-09-10 12:40:31Z mav $");
43__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_backend_ramdisk.c 287670 2015-09-11 14:33:05Z mav $");
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/kernel.h>
48#include <sys/condvar.h>
49#include <sys/types.h>
50#include <sys/lock.h>
51#include <sys/mutex.h>

--- 450 unchanged lines hidden (view full) ---

502 STAILQ_REMOVE(&softc->lun_list, be_lun, ctl_be_ramdisk_lun,
503 links);
504 softc->num_luns--;
505 }
506
507 mtx_unlock(&softc->lock);
508
509 if (retval == 0) {
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/kernel.h>
48#include <sys/condvar.h>
49#include <sys/types.h>
50#include <sys/lock.h>
51#include <sys/mutex.h>

--- 450 unchanged lines hidden (view full) ---

502 STAILQ_REMOVE(&softc->lun_list, be_lun, ctl_be_ramdisk_lun,
503 links);
504 softc->num_luns--;
505 }
506
507 mtx_unlock(&softc->lock);
508
509 if (retval == 0) {
510 taskqueue_drain(be_lun->io_taskqueue, &be_lun->io_task);
510 taskqueue_drain_all(be_lun->io_taskqueue);
511 taskqueue_free(be_lun->io_taskqueue);
512 ctl_free_opts(&be_lun->cbe_lun.options);
513 mtx_destroy(&be_lun->queue_lock);
514 free(be_lun, M_RAMDISK);
515 }
516
517 req->status = CTL_LUN_OK;
518

--- 476 unchanged lines hidden ---
511 taskqueue_free(be_lun->io_taskqueue);
512 ctl_free_opts(&be_lun->cbe_lun.options);
513 mtx_destroy(&be_lun->queue_lock);
514 free(be_lun, M_RAMDISK);
515 }
516
517 req->status = CTL_LUN_OK;
518

--- 476 unchanged lines hidden ---