Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/nfs pullup 1.33->1.34 (sommerfeld)
details: https://anonhg.NetBSD.org/src/rev/d7e9c10a98d1
branches: netbsd-1-4
changeset: 468634:d7e9c10a98d1
user: perry <perry%NetBSD.org@localhost>
date: Tue May 04 17:07:15 1999 +0000
description:
pullup 1.33->1.34 (sommerfeld)
diffstat:
sys/nfs/nfs_syscalls.c | 29 ++++++++++++++++++++++++++++-
1 files changed, 28 insertions(+), 1 deletions(-)
diffs (52 lines):
diff -r ecc55b2bfe05 -r d7e9c10a98d1 sys/nfs/nfs_syscalls.c
--- a/sys/nfs/nfs_syscalls.c Tue May 04 17:05:42 1999 +0000
+++ b/sys/nfs/nfs_syscalls.c Tue May 04 17:07:15 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_syscalls.c,v 1.33 1998/11/08 15:57:44 mycroft Exp $ */
+/* $NetBSD: nfs_syscalls.c,v 1.33.6.1 1999/05/04 17:07:15 perry Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -624,8 +624,23 @@
* gathered together.
*/
do {
+#ifdef DIAGNOSTIC
+ int lockcount;
+#endif
switch (cacherep) {
case RC_DOIT:
+#ifdef DIAGNOSTIC
+ /*
+ * NFS server procs should neither release
+ * locks already held, nor leave things
+ * locked. Catch this sooner, rather than
+ * later (when we try to relock something we
+ * already have locked). Careful inspection
+ * of the failing routine usually turns up the
+ * lock leak.. once we know what it is..
+ */
+ lockcount = p->p_locks;
+#endif
if (writes_todo || (nd->nd_procnum == NFSPROC_WRITE &&
nfsrvw_procrastinate > 0 && !notstarted))
error = nfsrv_writegather(&nd, slp,
@@ -633,6 +648,18 @@
else
error = (*(nfsrv3_procs[nd->nd_procnum]))(nd,
slp, nfsd->nfsd_procp, &mreq);
+#ifdef DIAGNOSTIC
+ if (p->p_locks != lockcount) {
+ /*
+ * If you see this panic, audit
+ * nfsrv3_procs[nd->nd_procnum] for vnode
+ * locking errors (usually, it's due to
+ * forgetting to vput() something).
+ */
+ panic("nfsd: locking botch in op %d",
+ nd ? nd->nd_procnum : -1);
+ }
+#endif
if (mreq == NULL)
break;
if (error) {
Home |
Main Index |
Thread Index |
Old Index