summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-02-10 22:39:44 +0000
committerjhb <jhb@FreeBSD.org>2009-02-10 22:39:44 +0000
commitcfd8052cca05037280083dd34a51e67718c3133a (patch)
treea9c0aa3f6fb5d8d130a19f7a26e56742a8ebdfc4 /sys/cam
parent05ddd147f8ed9dfa25cc814f2818f8916e958def (diff)
downloadFreeBSD-src-cfd8052cca05037280083dd34a51e67718c3133a.zip
FreeBSD-src-cfd8052cca05037280083dd34a51e67718c3133a.tar.gz
Adding dynamic sysctls no longer requires Giant.
Submitted by: rdivacky
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_cd.c4
-rw-r--r--sys/cam/scsi/scsi_da.c3
2 files changed, 0 insertions, 7 deletions
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index 8eb3537..844baba 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -555,8 +555,6 @@ cdsysctlinit(void *context, int pending)
snprintf(tmpstr, sizeof(tmpstr), "CAM CD unit %d", periph->unit_number);
snprintf(tmpstr2, sizeof(tmpstr2), "%d", periph->unit_number);
- mtx_lock(&Giant);
-
sysctl_ctx_init(&softc->sysctl_ctx);
softc->flags |= CD_FLAG_SCTX_INIT;
softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx,
@@ -565,7 +563,6 @@ cdsysctlinit(void *context, int pending)
if (softc->sysctl_tree == NULL) {
printf("cdsysctlinit: unable to allocate sysctl tree\n");
- mtx_unlock(&Giant);
cam_periph_release(periph);
return;
}
@@ -579,7 +576,6 @@ cdsysctlinit(void *context, int pending)
&softc->minimum_command_size, 0, cdcmdsizesysctl, "I",
"Minimum CDB size");
- mtx_unlock(&Giant);
cam_periph_release(periph);
}
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index f6f0aa4..012d46d 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -1086,7 +1086,6 @@ dasysctlinit(void *context, int pending)
snprintf(tmpstr, sizeof(tmpstr), "CAM DA unit %d", periph->unit_number);
snprintf(tmpstr2, sizeof(tmpstr2), "%d", periph->unit_number);
- mtx_lock(&Giant);
sysctl_ctx_init(&softc->sysctl_ctx);
softc->flags |= DA_FLAG_SCTX_INIT;
softc->sysctl_tree = SYSCTL_ADD_NODE(&softc->sysctl_ctx,
@@ -1094,7 +1093,6 @@ dasysctlinit(void *context, int pending)
CTLFLAG_RD, 0, tmpstr);
if (softc->sysctl_tree == NULL) {
printf("dasysctlinit: unable to allocate sysctl tree\n");
- mtx_unlock(&Giant);
cam_periph_release(periph);
return;
}
@@ -1108,7 +1106,6 @@ dasysctlinit(void *context, int pending)
&softc->minimum_cmd_size, 0, dacmdsizesysctl, "I",
"Minimum CDB size");
- mtx_unlock(&Giant);
cam_periph_release(periph);
}
OpenPOWER on IntegriCloud