[Midnightbsd-cvs] src [8250] trunk/sys/cam/cam_xpt.c: dont explcude xpt sim from locking
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Sep 17 17:34:47 EDT 2016
Revision: 8250
http://svnweb.midnightbsd.org/src/?rev=8250
Author: laffer1
Date: 2016-09-17 17:34:46 -0400 (Sat, 17 Sep 2016)
Log Message:
-----------
dont explcude xpt sim from locking
Modified Paths:
--------------
trunk/sys/cam/cam_xpt.c
Modified: trunk/sys/cam/cam_xpt.c
===================================================================
--- trunk/sys/cam/cam_xpt.c 2016-09-17 21:34:30 UTC (rev 8249)
+++ trunk/sys/cam/cam_xpt.c 2016-09-17 21:34:46 UTC (rev 8250)
@@ -3433,19 +3433,14 @@
struct cam_path *path;
struct cam_eb *bus = NULL;
cam_status status;
- int need_unlock = 0;
path = (struct cam_path *)malloc(sizeof(*path), M_CAMPATH, M_WAITOK);
- if (path_id != CAM_BUS_WILDCARD) {
- bus = xpt_find_bus(path_id);
- if (bus != NULL) {
- need_unlock = 1;
- CAM_SIM_LOCK(bus->sim);
- }
- }
+ bus = xpt_find_bus(path_id);
+ if (bus != NULL)
+ CAM_SIM_LOCK(bus->sim);
status = xpt_compile_path(path, periph, path_id, target_id, lun_id);
- if (need_unlock) {
+ if (bus != NULL) {
CAM_SIM_UNLOCK(bus->sim);
xpt_release_bus(bus);
}
More information about the Midnightbsd-cvs
mailing list