diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c index ceaec31d5b78..56b7357be7b9 100644 --- a/sys/nfs/nfs_node.c +++ b/sys/nfs/nfs_node.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_node.c 8.2 (Berkeley) 12/30/93 - * $Id: nfs_node.c,v 1.9 1995/06/27 11:06:35 dfr Exp $ + * $Id: nfs_node.c,v 1.10 1995/07/21 10:25:13 davidg Exp $ */ #include @@ -127,13 +127,13 @@ loop: return(0); } /* - * Obtain a lock to prevent a race condition if the getnewvnode - * or malloc below happen to block. + * Obtain a lock to prevent a race condition if the getnewvnode() + * or MALLOC() below happens to block. */ if (nfs_node_hash_lock) { while (nfs_node_hash_lock) { nfs_node_hash_lock = -1; - tsleep(&nfs_node_hash_lock, PVM, "ffsvgt", 0); + tsleep(&nfs_node_hash_lock, PVM, "nfsngt", 0); } goto loop; } @@ -141,12 +141,8 @@ loop: error = getnewvnode(VT_NFS, mntp, nfsv2_vnodeop_p, &nvp); if (error) { - /* - * Wakeup anyone blocked on our lock. - */ - if (nfs_node_hash_lock < 0) { + if (nfs_node_hash_lock < 0) wakeup(&nfs_node_hash_lock); - } nfs_node_hash_lock = 0; *npp = 0; return (error); @@ -168,12 +164,8 @@ loop: np->n_fhsize = fhsize; *npp = np; - /* - * Wakeup anyone blocked on our lock - */ - if (nfs_node_hash_lock < 0) { + if (nfs_node_hash_lock < 0) wakeup(&nfs_node_hash_lock); - } nfs_node_hash_lock = 0; /* diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c index ceaec31d5b78..56b7357be7b9 100644 --- a/sys/nfsclient/nfs_node.c +++ b/sys/nfsclient/nfs_node.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_node.c 8.2 (Berkeley) 12/30/93 - * $Id: nfs_node.c,v 1.9 1995/06/27 11:06:35 dfr Exp $ + * $Id: nfs_node.c,v 1.10 1995/07/21 10:25:13 davidg Exp $ */ #include @@ -127,13 +127,13 @@ loop: return(0); } /* - * Obtain a lock to prevent a race condition if the getnewvnode - * or malloc below happen to block. + * Obtain a lock to prevent a race condition if the getnewvnode() + * or MALLOC() below happens to block. */ if (nfs_node_hash_lock) { while (nfs_node_hash_lock) { nfs_node_hash_lock = -1; - tsleep(&nfs_node_hash_lock, PVM, "ffsvgt", 0); + tsleep(&nfs_node_hash_lock, PVM, "nfsngt", 0); } goto loop; } @@ -141,12 +141,8 @@ loop: error = getnewvnode(VT_NFS, mntp, nfsv2_vnodeop_p, &nvp); if (error) { - /* - * Wakeup anyone blocked on our lock. - */ - if (nfs_node_hash_lock < 0) { + if (nfs_node_hash_lock < 0) wakeup(&nfs_node_hash_lock); - } nfs_node_hash_lock = 0; *npp = 0; return (error); @@ -168,12 +164,8 @@ loop: np->n_fhsize = fhsize; *npp = np; - /* - * Wakeup anyone blocked on our lock - */ - if (nfs_node_hash_lock < 0) { + if (nfs_node_hash_lock < 0) wakeup(&nfs_node_hash_lock); - } nfs_node_hash_lock = 0; /*