summaryrefslogtreecommitdiffstats
path: root/sys/fs/nwfs
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-04-13 10:59:09 +0000
committerjeff <jeff@FreeBSD.org>2005-04-13 10:59:09 +0000
commitafab3762a03836a33f6a8bd19afdb3d9559e12ec (patch)
treed93f4bc84645fcd224218d7e1c19b2f6b18a4c6c /sys/fs/nwfs
parent5642885b84d3a8dfdbf202dfbab02e5c4a93576f (diff)
downloadFreeBSD-src-afab3762a03836a33f6a8bd19afdb3d9559e12ec.zip
FreeBSD-src-afab3762a03836a33f6a8bd19afdb3d9559e12ec.tar.gz
- Change all filesystems and vfs_cache to relock the dvp once the child is
locked in the ISDOTDOT case. Se vfs_lookup.c r1.79 for details. Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys/fs/nwfs')
-rw-r--r--sys/fs/nwfs/nwfs_vnops.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/fs/nwfs/nwfs_vnops.c b/sys/fs/nwfs/nwfs_vnops.c
index e5780d2..90f9c4e 100644
--- a/sys/fs/nwfs/nwfs_vnops.c
+++ b/sys/fs/nwfs/nwfs_vnops.c
@@ -883,8 +883,7 @@ printf("dvp %d:%d:%d\n", (int)mp, (int)dvp->v_vflag & VV_ROOT, (int)flags & ISDO
} else if (flags & ISDOTDOT) {
VOP_UNLOCK(dvp, 0, td); /* unlock parent */
error = vget(vp, LK_EXCLUSIVE, td);
- if (error)
- vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, td);
+ vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, td);
} else
error = vget(vp, LK_EXCLUSIVE, td);
if (!error) {
@@ -901,8 +900,6 @@ printf("dvp %d:%d:%d\n", (int)mp, (int)dvp->v_vflag & VV_ROOT, (int)flags & ISDO
vput(vp);
else
vrele(vp);
- if (flags & ISDOTDOT)
- vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, td);
}
vdrop(vp);
*vpp = NULLVP;
@@ -978,10 +975,9 @@ printf("dvp %d:%d:%d\n", (int)mp, (int)dvp->v_vflag & VV_ROOT, (int)flags & ISDO
if (flags & ISDOTDOT) {
VOP_UNLOCK(dvp, 0, td); /* race to get the inode */
error = nwfs_nget(mp, fid, NULL, NULL, &vp);
- if (error) {
- vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, td);
+ vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY, td);
+ if (error)
return (error);
- }
*vpp = vp;
} else if (NWCMPF(&dnp->n_fid, &fid)) {
vref(dvp);
OpenPOWER on IntegriCloud