Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/nfs Drop vnode lock before removing the sillyrename file...
details: https://anonhg.NetBSD.org/src/rev/446a7781c6b7
branches: trunk
changeset: 509402:446a7781c6b7
user: fvdl <fvdl%NetBSD.org@localhost>
date: Thu May 03 15:53:04 2001 +0000
description:
Drop vnode lock before removing the sillyrename file, to avoid a
lock-o-death.
diffstat:
sys/nfs/nfs_node.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (35 lines):
diff -r 4dcfbc24c167 -r 446a7781c6b7 sys/nfs/nfs_node.c
--- a/sys/nfs/nfs_node.c Thu May 03 15:39:48 2001 +0000
+++ b/sys/nfs/nfs_node.c Thu May 03 15:53:04 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_node.c,v 1.43 2001/04/20 11:19:16 fvdl Exp $ */
+/* $NetBSD: nfs_node.c,v 1.44 2001/05/03 15:53:04 fvdl Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -218,9 +218,13 @@
sp = np->n_sillyrename;
np->n_sillyrename = (struct sillyrename *)0;
} else
- sp = (struct sillyrename *)0;
- if (sp) {
+ sp = NULL;
+ if (sp != NULL)
nfs_vinvalbuf(vp, 0, sp->s_cred, p, 1);
+ np->n_flag &= (NMODIFIED | NFLUSHINPROG | NFLUSHWANT | NQNFSEVICTED |
+ NQNFSNONCACHE | NQNFSWRITE);
+ VOP_UNLOCK(vp, 0);
+ if (sp != NULL) {
/*
* Remove the silly file that was rename'd earlier
@@ -232,9 +236,6 @@
vput(sp->s_dvp);
FREE(sp, M_NFSREQ);
}
- np->n_flag &= (NMODIFIED | NFLUSHINPROG | NFLUSHWANT | NQNFSEVICTED |
- NQNFSNONCACHE | NQNFSWRITE);
- VOP_UNLOCK(vp, 0);
return (0);
}
Home |
Main Index |
Thread Index |
Old Index