diff options
| author | riastradh <riastradh@NetBSD.org> | 2022-08-22 00:19:53 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2022-08-22 00:19:53 +0000 |
| commit | 2a40a416358fe656bb3a040beeed2bdf38e7e9c9 (patch) | |
| tree | 9f18ff2947b29d553082c4b9c00aa1ed45824c94 /sys/dev | |
| parent | 727b77508a77a58d96f745a94ae0d1ad7267974b (diff) | |
dk(4): Turn locking contract comment into assertions in dklastclose.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/dkwedge/dk.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/dkwedge/dk.c b/sys/dev/dkwedge/dk.c index 1143634ab85..0bcbe49b0ad 100644 --- a/sys/dev/dkwedge/dk.c +++ b/sys/dev/dkwedge/dk.c @@ -1,4 +1,4 @@ -/* $NetBSD: dk.c,v 1.116 2022/08/22 00:19:43 riastradh Exp $ */ +/* $NetBSD: dk.c,v 1.117 2022/08/22 00:19:53 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.116 2022/08/22 00:19:43 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.117 2022/08/22 00:19:53 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_dkwedge.h" @@ -1199,15 +1199,15 @@ dkopen(dev_t dev, int flags, int fmt, struct lwp *l) return (error); } -/* - * Caller must hold sc->sc_dk.dk_openlock and sc->sc_parent->dk_rawlock. - */ static int dklastclose(struct dkwedge_softc *sc) { struct vnode *vp; int error = 0, mode; + KASSERT(mutex_owned(&sc->sc_dk.dk_openlock)); + KASSERT(mutex_owned(&sc->sc_parent->dk_rawlock)); + mode = sc->sc_mode; vp = NULL; |
