diff options
Diffstat (limited to 'sys/nfs/nfs_node.c')
-rw-r--r-- | sys/nfs/nfs_node.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/nfs/nfs_node.c b/sys/nfs/nfs_node.c index 39027998851..693efab846e 100644 --- a/sys/nfs/nfs_node.c +++ b/sys/nfs/nfs_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_node.c,v 1.42 2008/08/09 10:14:02 thib Exp $ */ +/* $OpenBSD: nfs_node.c,v 1.43 2008/12/23 21:56:12 thib Exp $ */ /* $NetBSD: nfs_node.c,v 1.16 1996/02/18 11:53:42 fvdl Exp $ */ /* @@ -94,6 +94,7 @@ nfs_nget(mntp, fhp, fhsize, npp) int fhsize; struct nfsnode **npp; { + struct nfsmount *nmp; struct proc *p = curproc; /* XXX */ struct nfsnode *np; struct nfsnodehashhead *nhpp; @@ -133,14 +134,12 @@ loop: * Are we getting the root? If so, make sure the vnode flags * are correct */ - { - struct nfsmount *nmp = VFSTONFS(mntp); - if ((fhsize == nmp->nm_fhsize) && - !bcmp(fhp, nmp->nm_fh, fhsize)) { - if (vp->v_type == VNON) - vp->v_type = VDIR; - vp->v_flag |= VROOT; - } + nmp = VFSTONFS(mntp); + if ((fhsize == nmp->nm_fhsize) && + !bcmp(fhp, nmp->nm_fh, fhsize)) { + if (vp->v_type == VNON) + vp->v_type = VDIR; + vp->v_flag |= VROOT; } LIST_INSERT_HEAD(nhpp, np, n_hash); |