summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver/nfs_srvsubs.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2006-02-01 00:25:26 +0000
committerjeff <jeff@FreeBSD.org>2006-02-01 00:25:26 +0000
commit30a231055bbecc02f17f1f4fe10c32564b6bcb22 (patch)
tree7bf7224bada967b7ee62d1c1257eab0efb97b47e /sys/nfsserver/nfs_srvsubs.c
parent34e5ca5b0218833663b71e333221ff426ec2e440 (diff)
downloadFreeBSD-src-30a231055bbecc02f17f1f4fe10c32564b6bcb22.zip
FreeBSD-src-30a231055bbecc02f17f1f4fe10c32564b6bcb22.tar.gz
- Reorder calls to vrele() after calls to vput() when the vrele is a
directory. vrele() may lock the passed vnode, which in these cases would give an invalid lock order of child -> parent. These situations are deadlock prone although do not typically deadlock because the vrele is typically not releasing the last reference to the vnode. Users of vrele must consider it as a call to vn_lock() and order it appropriately. MFC After: 1 week Sponsored by: Isilon Systems, Inc. Tested by: kkenn
Diffstat (limited to 'sys/nfsserver/nfs_srvsubs.c')
-rw-r--r--sys/nfsserver/nfs_srvsubs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c
index 437dd63..1aa976a 100644
--- a/sys/nfsserver/nfs_srvsubs.c
+++ b/sys/nfsserver/nfs_srvsubs.c
@@ -831,8 +831,8 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
if (ndp->ni_pathlen > 1)
uma_zfree(namei_zone, cp);
badlink2:
- vrele(ndp->ni_dvp);
vput(ndp->ni_vp);
+ vrele(ndp->ni_dvp);
break;
}
linklen = MAXPATHLEN - auio.uio_resid;
OpenPOWER on IntegriCloud