summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormlelstv <mlelstv@NetBSD.org>2022-09-04 21:56:38 +0000
committermlelstv <mlelstv@NetBSD.org>2022-09-04 21:56:38 +0000
commit120d74d81fcdf231c8d94e54953631f33d0ffee5 (patch)
treecc32b4fac1d0056d490a6ba5c20255fbed9afed4 /sys/dev
parenta724c03ba6fe745f55d4fc2c13e149fcb82561aa (diff)
revert 1.281
VNDIOCLR requires write access to unconfigure a unit, even when the unit is read-only.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/vnd.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index 6326c13c33c..8998f9b40b7 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vnd.c,v 1.286 2022/05/31 14:13:31 riastradh Exp $ */
+/* $NetBSD: vnd.c,v 1.287 2022/09/04 21:56:38 mlelstv Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008, 2020 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.286 2022/05/31 14:13:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.287 2022/09/04 21:56:38 mlelstv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_vnd.h"
@@ -364,11 +364,6 @@ vndopen(dev_t dev, int flags, int mode, struct lwp *l)
goto done;
}
- if ((flags & FWRITE) && (sc->sc_flags & VNF_READONLY)) {
- error = EROFS;
- goto done;
- }
-
if (sc->sc_flags & VNF_INITED) {
if ((sc->sc_dkdev.dk_openmask & ~(1<<RAW_PART)) != 0) {
/*