svn commit: r254250 - projects/camlock/sys/cam/scsi
Alexander Motin
mav at FreeBSD.org
Mon Aug 12 15:35:10 UTC 2013
Author: mav
Date: Mon Aug 12 15:35:10 2013
New Revision: 254250
URL: http://svnweb.freebsd.org/changeset/base/254250
Log:
Switch targ(4) to using new per-device lock.
Modified:
projects/camlock/sys/cam/scsi/scsi_target.c
Modified: projects/camlock/sys/cam/scsi/scsi_target.c
==============================================================================
--- projects/camlock/sys/cam/scsi/scsi_target.c Mon Aug 12 14:30:11 2013 (r254249)
+++ projects/camlock/sys/cam/scsi/scsi_target.c Mon Aug 12 15:35:10 2013 (r254250)
@@ -236,7 +236,6 @@ targioctl(struct cdev *dev, u_long cmd,
{
struct ioc_enable_lun *new_lun;
struct cam_path *path;
- struct cam_sim *sim;
new_lun = (struct ioc_enable_lun *)addr;
status = xpt_create_path(&path, /*periph*/NULL,
@@ -247,12 +246,11 @@ targioctl(struct cdev *dev, u_long cmd,
printf("Couldn't create path, status %#x\n", status);
break;
}
- sim = xpt_path_sim(path);
- mtx_lock(sim->mtx);
+ xpt_path_lock(path);
status = targenable(softc, path, new_lun->grp6_len,
new_lun->grp7_len);
+ xpt_path_unlock(path);
xpt_free_path(path);
- mtx_unlock(sim->mtx);
break;
}
case TARGIOCDISABLE:
More information about the svn-src-projects
mailing list