mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-18 17:00:49 +01:00
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:
parent
a16721a13a
commit
d15ea423f7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9627
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user