diff options
author | jeff <jeff@FreeBSD.org> | 2005-03-28 09:25:25 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2005-03-28 09:25:25 +0000 |
commit | b25a47299357437c7d4212884ceaecdab1369edc (patch) | |
tree | 49cfd1c888dc1e77fe5cd678562f6a772e50f032 /sys/kern | |
parent | 9043d7b0a72e9d4c3ecde08c9b95f52ba76d73c2 (diff) | |
download | FreeBSD-src-b25a47299357437c7d4212884ceaecdab1369edc.zip FreeBSD-src-b25a47299357437c7d4212884ceaecdab1369edc.tar.gz |
- Adjust asserts in vop_lookup_post() to match the new post PDIRUNLOCK
vfs.
Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_subr.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 1c6da3f..c9016d1 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3370,18 +3370,15 @@ vop_lookup_post(void *ap, int rc) ASSERT_VI_UNLOCKED(dvp, "VOP_LOOKUP"); - /* - * If this is the last path component for this lookup and LOCKPARENT - * is set, OR if there is an error the directory has to be locked. - */ - if ((flags & LOCKPARENT) && (flags & ISLASTCN)) - ASSERT_VOP_LOCKED(dvp, "VOP_LOOKUP (LOCKPARENT)"); - else if (rc != 0) + if (rc) ASSERT_VOP_LOCKED(dvp, "VOP_LOOKUP (error)"); - else if (dvp != vp) - ASSERT_VOP_UNLOCKED(dvp, "VOP_LOOKUP (dvp)"); - if (flags & PDIRUNLOCK) - ASSERT_VOP_UNLOCKED(dvp, "VOP_LOOKUP (PDIRUNLOCK)"); + else if (flags & ISDOTDOT) + ASSERT_VOP_UNLOCKED(dvp, "VOP_LOOKUP (ISDOTDOT)"); + else + ASSERT_VOP_LOCKED(dvp, "VOP_LOOKUP"); + + if (!rc) + ASSERT_VOP_LOCKED(vp, "VOP_LOOKUP (child)"); } void |