Add missing call to vndunlock(), per PR #3811, enami tsugutomo.

This commit is contained in:
thorpej 1997-08-26 18:12:58 +00:00
parent 05efcc80e4
commit f26fad2f33

View File

@ -1,4 +1,4 @@
/* $NetBSD: vnd.c,v 1.45 1997/08/04 10:00:13 fair Exp $ */
/* $NetBSD: vnd.c,v 1.46 1997/08/26 18:12:58 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -765,8 +765,10 @@ vndioctl(dev, cmd, data, flag, p)
* Size must be at least 2048 DEV_BSIZE blocks
* (1M) in order to use this geometry.
*/
if (vnd->sc_size < (32 * 64))
if (vnd->sc_size < (32 * 64)) {
vndunlock(vnd);
return (EINVAL);
}
vnd->sc_geom.vng_secsize = DEV_BSIZE;
vnd->sc_geom.vng_nsectors = 32;