diff options
author | dg <dg@FreeBSD.org> | 1995-07-22 03:32:18 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-07-22 03:32:18 +0000 |
commit | c7867a1bdfabbcd3cb6002ecf474aa94e6ebd872 (patch) | |
tree | 927b07773eba11d1f83bac65bddce4acbee98f93 /sys/nfs | |
parent | 688f94b1434ed320dfa1c4a16c80bac5f308daf5 (diff) | |
download | FreeBSD-src-c7867a1bdfabbcd3cb6002ecf474aa94e6ebd872.zip FreeBSD-src-c7867a1bdfabbcd3cb6002ecf474aa94e6ebd872.tar.gz |
Correct my cut-'n-paste job from ffs_vfsops.c and fix up the formatting
to be similar.
Submitted by: Bruce Evans
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_node.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c index ceaec31..56b7357 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 <sys/param.h> @@ -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; /* |