mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Adding dynamic sysctls no longer requires Giant.
Submitted by: rdivacky
This commit is contained in:
parent
4012d104cd
commit
b7208da623
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=188458
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user