summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2005-03-28 09:35:58 +0000
committerjeff <jeff@FreeBSD.org>2005-03-28 09:35:58 +0000
commitf4493fbc1caeb2f68a130056f83c5c0015eefda1 (patch)
tree3fd2c16a7907a4bdde03fff51b9d8d4ad550bcdd
parentb136fd4eeec08b4463f68e065e6aa2a33f14b660 (diff)
downloadFreeBSD-src-f4493fbc1caeb2f68a130056f83c5c0015eefda1.zip
FreeBSD-src-f4493fbc1caeb2f68a130056f83c5c0015eefda1.tar.gz
- UFS no longer uses PDIRUNLOCK to track the parent state. Instead, we now
rely on ufs to always leave the parent locked except in the ISDOTDOT case. Adjust asserts to deal with these changes. Sponsored by: Isilon Systems, Inc.
-rw-r--r--sys/ufs/ufs/ufs_extattr.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/sys/ufs/ufs/ufs_extattr.c b/sys/ufs/ufs/ufs_extattr.c
index 2d8ec43..83d9662 100644
--- a/sys/ufs/ufs/ufs_extattr.c
+++ b/sys/ufs/ufs/ufs_extattr.c
@@ -277,17 +277,15 @@ ufs_extattr_lookup(struct vnode *start_dvp, int lockparent, char *dirname,
* Error condition, may have to release the lock on the parent
* if ufs_lookup() didn't.
*/
- if (!(cnp.cn_flags & PDIRUNLOCK) &&
- (lockparent == UE_GETDIR_LOCKPARENT_DONT))
+ if (lockparent == UE_GETDIR_LOCKPARENT_DONT)
VOP_UNLOCK(start_dvp, 0, td);
/*
* Check that ufs_lookup() didn't release the lock when we
* didn't want it to.
*/
- if ((cnp.cn_flags & PDIRUNLOCK) &&
- (lockparent == UE_GETDIR_LOCKPARENT))
- panic("ufs_extattr_lookup: lockparent but PDIRUNLOCK");
+ if (lockparent == UE_GETDIR_LOCKPARENT)
+ ASSERT_VOP_LOCKED(start_dvp, "ufs_extattr_lookup");
return (error);
}
@@ -296,14 +294,11 @@ ufs_extattr_lookup(struct vnode *start_dvp, int lockparent, char *dirname,
panic("ufs_extattr_lookup: target_vp == start_dvp");
*/
- if (target_vp != start_dvp &&
- !(cnp.cn_flags & PDIRUNLOCK) &&
- (lockparent == UE_GETDIR_LOCKPARENT_DONT))
- panic("ufs_extattr_lookup: !lockparent but !PDIRUNLOCK");
+ if (target_vp != start_dvp && lockparent == UE_GETDIR_LOCKPARENT_DONT)
+ VOP_UNLOCK(start_dvp, 0, td);
- if ((cnp.cn_flags & PDIRUNLOCK) &&
- (lockparent == UE_GETDIR_LOCKPARENT))
- panic("ufs_extattr_lookup: lockparent but PDIRUNLOCK");
+ if (lockparent == UE_GETDIR_LOCKPARENT)
+ ASSERT_VOP_LOCKED(start_dvp, "ufs_extattr_lookup");
/* printf("ufs_extattr_lookup: success\n"); */
*vp = target_vp;
OpenPOWER on IntegriCloud