Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/miscfs/specfs specfs: If sd_opencnt is zero, sn_opencnt ...
details: https://anonhg.NetBSD.org/src/rev/ce9bf1fbbc33
branches: trunk
changeset: 364507:ce9bf1fbbc33
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Mar 28 12:36:00 2022 +0000
description:
specfs: If sd_opencnt is zero, sn_opencnt had better be zero.
diffstat:
sys/miscfs/specfs/spec_vnops.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 40f225c138df -r ce9bf1fbbc33 sys/miscfs/specfs/spec_vnops.c
--- a/sys/miscfs/specfs/spec_vnops.c Mon Mar 28 12:35:52 2022 +0000
+++ b/sys/miscfs/specfs/spec_vnops.c Mon Mar 28 12:36:00 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spec_vnops.c,v 1.196 2022/03/28 12:35:52 riastradh Exp $ */
+/* $NetBSD: spec_vnops.c,v 1.197 2022/03/28 12:36:00 riastradh Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.196 2022/03/28 12:35:52 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.197 2022/03/28 12:36:00 riastradh Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -581,6 +581,7 @@
error = EBUSY;
break;
}
+ KASSERTMSG(sn->sn_opencnt == 0, "%u", sn->sn_opencnt);
sn->sn_opencnt = 1;
sd->sd_opencnt = 1;
sd->sd_bdevvp = vp;
Home |
Main Index |
Thread Index |
Old Index