Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/nfs nfs_inactive:
details: https://anonhg.NetBSD.org/src/rev/0b19637e6884
branches: trunk
changeset: 586797:0b19637e6884
user: yamt <yamt%NetBSD.org@localhost>
date: Mon Jan 02 21:43:24 2006 +0000
description:
nfs_inactive:
- use LK_CANRECURSE instead of LK_RECURSEFAIL.
PR/32435 from Valeriy E. Ushakov.
- panic explicitly if the parent directory has been revoked.
add an XXX comment.
diffstat:
sys/nfs/nfs_node.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diffs (57 lines):
diff -r 21e0f7ce3054 -r 0b19637e6884 sys/nfs/nfs_node.c
--- a/sys/nfs/nfs_node.c Mon Jan 02 21:29:53 2006 +0000
+++ b/sys/nfs/nfs_node.c Mon Jan 02 21:43:24 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_node.c,v 1.81 2005/12/11 12:25:16 christos Exp $ */
+/* $NetBSD: nfs_node.c,v 1.82 2006/01/02 21:43:24 yamt Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_node.c,v 1.81 2005/12/11 12:25:16 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_node.c,v 1.82 2006/01/02 21:43:24 yamt Exp $");
#include "opt_nfs.h"
@@ -232,7 +232,6 @@
struct vnode *vp = ap->a_vp;
struct nfsmount *nmp = VFSTONFS(vp->v_mount);
boolean_t removed;
- int err;
np = VTONFS(vp);
if (prtactive && vp->v_usecount != 0)
@@ -263,22 +262,23 @@
vrecycle(vp, NULL, l);
if (sp != NULL) {
+ int error;
/*
* Remove the silly file that was rename'd earlier
*
* Just in case our thread also has the parent node locked,
- * we let vn_lock() fail.
+ * we use LK_CANRECURSE.
*/
- err = vn_lock(sp->s_dvp, LK_EXCLUSIVE | LK_RETRY
- | LK_RECURSEFAIL);
+ error = vn_lock(sp->s_dvp, LK_EXCLUSIVE | LK_CANRECURSE);
+ if (error || sp->s_dvp->v_data == NULL) {
+ /* XXX should recover */
+ panic("%s: vp=%p error=%d", __func__, sp->s_dvp, error);
+ }
nfs_removeit(sp);
crfree(sp->s_cred);
- if (err != EDEADLK)
- vput(sp->s_dvp);
- else
- vrele(sp->s_dvp);
+ vput(sp->s_dvp);
FREE(sp, M_NFSREQ);
}
Home |
Main Index |
Thread Index |
Old Index