diff options
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/dkwedge/dk.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/sys/dev/dkwedge/dk.c b/sys/dev/dkwedge/dk.c index 2e40b0f16c2..614a2e426fd 100644 --- a/sys/dev/dkwedge/dk.c +++ b/sys/dev/dkwedge/dk.c @@ -1,4 +1,4 @@ -/* $NetBSD: dk.c,v 1.145 2023/04/21 18:44:18 riastradh Exp $ */ +/* $NetBSD: dk.c,v 1.146 2023/04/21 18:44:58 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.145 2023/04/21 18:44:18 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.146 2023/04/21 18:44:58 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_dkwedge.h" @@ -1809,9 +1809,6 @@ dksize(dev_t dev) if (sc->sc_state != DKW_STATE_RUNNING) return -1; - mutex_enter(&sc->sc_dk.dk_openlock); - mutex_enter(&sc->sc_parent->dk_rawlock); - /* Our content type is static, no need to open the device. */ p_size = dkwedge_size(sc) << sc->sc_parent->dk_blkshift; @@ -1823,9 +1820,6 @@ dksize(dev_t dev) rv = (int)p_size; } - mutex_exit(&sc->sc_parent->dk_rawlock); - mutex_exit(&sc->sc_dk.dk_openlock); - return rv; } @@ -1847,9 +1841,6 @@ dkdump(dev_t dev, daddr_t blkno, void *va, size_t size) if (sc->sc_state != DKW_STATE_RUNNING) return ENXIO; - mutex_enter(&sc->sc_dk.dk_openlock); - mutex_enter(&sc->sc_parent->dk_rawlock); - /* Our content type is static, no need to open the device. */ if (strcmp(sc->sc_ptype, DKW_PTYPE_SWAP) != 0 && @@ -1878,9 +1869,6 @@ dkdump(dev_t dev, daddr_t blkno, void *va, size_t size) rv = (*bdev->d_dump)(sc->sc_pdev, blkno + p_offset, va, size); out: - mutex_exit(&sc->sc_parent->dk_rawlock); - mutex_exit(&sc->sc_dk.dk_openlock); - return rv; } |
