Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/dkwedge dk(4): Narrow the scope of the device number...
details: https://anonhg.NetBSD.org/src/rev/549e36137879
branches: trunk
changeset: 374394:549e36137879
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Apr 21 18:54:09 2023 +0000
description:
dk(4): Narrow the scope of the device numbering lookup on detach.
Just need it for vdevgone, order relative to other things in detach
doesn't matter.
No functional change intended.
diffstat:
sys/dev/dkwedge/dk.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (40 lines):
diff -r 700a19757ae6 -r 549e36137879 sys/dev/dkwedge/dk.c
--- a/sys/dev/dkwedge/dk.c Fri Apr 21 18:45:13 2023 +0000
+++ b/sys/dev/dkwedge/dk.c Fri Apr 21 18:54:09 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dk.c,v 1.147 2023/04/21 18:45:13 riastradh Exp $ */
+/* $NetBSD: dk.c,v 1.148 2023/04/21 18:54:09 riastradh Exp $ */
/*-
* Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.147 2023/04/21 18:45:13 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.148 2023/04/21 18:54:09 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_dkwedge.h"
@@ -704,10 +704,6 @@ dkwedge_detach(device_t self, int flags)
pmf_device_deregister(self);
- /* Locate the wedge major numbers. */
- bmaj = bdevsw_lookup_major(&dk_bdevsw);
- cmaj = cdevsw_lookup_major(&dk_cdevsw);
-
/* Kill any pending restart. */
mutex_enter(&sc->sc_iolock);
sc->sc_iostop = true;
@@ -722,6 +718,10 @@ dkwedge_detach(device_t self, int flags)
dkstart(sc);
dkwedge_wait_drain(sc);
+ /* Locate the wedge major numbers. */
+ bmaj = bdevsw_lookup_major(&dk_bdevsw);
+ cmaj = cdevsw_lookup_major(&dk_cdevsw);
+
/* Nuke the vnodes for any open instances. */
vdevgone(bmaj, unit, unit, VBLK);
vdevgone(cmaj, unit, unit, VCHR);
Home |
Main Index |
Thread Index |
Old Index