- 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.
This commit is contained in:
parent
eddcb03d02
commit
e19881ff08
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user