Correct my cut-'n-paste job from ffs_vfsops.c and fix up the formatting

to be similar.

Submitted by:	Bruce Evans
This commit is contained in:
David Greenman 1995-07-22 03:32:18 +00:00
parent a16721a13a
commit d15ea423f7
2 changed files with 12 additions and 28 deletions

View File

@ -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 @@ nfs_nget(mntp, fhp, fhsize, npp)
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 @@ nfs_nget(mntp, fhp, fhsize, npp)
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 @@ nfs_nget(mntp, fhp, fhsize, npp)
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;
/*

View File

@ -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 @@ nfs_nget(mntp, fhp, fhsize, npp)
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 @@ nfs_nget(mntp, fhp, fhsize, npp)
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 @@ nfs_nget(mntp, fhp, fhsize, npp)
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;
/*