Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/nfs On VOP_GETATTR failure in nfs_nget, call vgone() to ...



details:   https://anonhg.NetBSD.org/src/rev/fd08d95b2b63
branches:  trunk
changeset: 508810:fd08d95b2b63
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Fri Apr 20 11:19:16 2001 +0000

description:
On VOP_GETATTR failure in nfs_nget, call vgone() to get rid
of the vnode that was just created. Suggested by Enami.

diffstat:

 sys/nfs/nfs_node.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 67b82e56cfa6 -r fd08d95b2b63 sys/nfs/nfs_node.c
--- a/sys/nfs/nfs_node.c        Fri Apr 20 10:15:02 2001 +0000
+++ b/sys/nfs/nfs_node.c        Fri Apr 20 11:19:16 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_node.c,v 1.42 2001/04/20 07:58:04 fvdl Exp $       */
+/*     $NetBSD: nfs_node.c,v 1.43 2001/04/20 11:19:16 fvdl Exp $       */
 
 /*
  * Copyright (c) 1989, 1993
@@ -186,7 +186,9 @@
         */
        error = VOP_GETATTR(vp, np->n_vattr, curproc->p_ucred, curproc);
        if (error) {
+               lockmgr(&vp->v_lock, LK_RELEASE, 0);
                lockmgr(&nfs_hashlock, LK_RELEASE, 0);
+               vgone(vp);
                return error;
        }
        uvm_vnp_setsize(vp, np->n_vattr->va_size);



Home | Main Index | Thread Index | Old Index