From 922cbab34192fa606c192b7914dbc5192bf15954 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Sat, 23 Apr 2011 17:01:05 +0000 Subject: The previous code only prevented the vnd from being opened for write in both simple and non-simple mode. Restore this behaviour by removing the openmask check. --- sys/dev/vnd.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'sys/dev/vnd.c') diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 917913d1b42..0e3db970b49 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.111 2011/04/23 14:57:01 deraadt Exp $ */ +/* $OpenBSD: vnd.c,v 1.112 2011/04/23 17:01:04 jsing Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -226,13 +226,6 @@ vndopen(dev_t dev, int flags, int mode, struct proc *p) part = DISKPART(dev); pmask = 1 << part; - /* Allow access to the raw device even if we are open. */ - if (sc->sc_dk.dk_openmask && !(part == RAW_PART) && - !(mode == S_IFCHR)) { - error = EBUSY; - goto bad; - } - /* Check that the partition exists. */ if (part != RAW_PART && ((sc->sc_flags & VNF_HAVELABEL) == 0 || -- cgit v1.2.3