diff options
author | avg <avg@FreeBSD.org> | 2012-11-19 11:32:56 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2012-11-19 11:32:56 +0000 |
commit | 4d2c561ebf8be7ac1fcb05244c285a9eb14363d7 (patch) | |
tree | 631add70fe356db6e453fefbdb231a259a1706f8 | |
parent | 0aae0e782c453d36e279bb02ca36c338b12e6c5b (diff) | |
download | FreeBSD-src-4d2c561ebf8be7ac1fcb05244c285a9eb14363d7.zip FreeBSD-src-4d2c561ebf8be7ac1fcb05244c285a9eb14363d7.tar.gz |
vnode_if: fix locking protocol description for lookup and cachedlookup
Also remove the checks from vop_lookup_pre and vop_lookup_post, which
are now completely redundant (before this change they were partially
redundant).
Discussed with: kib
MFC after: 10 days
-rw-r--r-- | sys/kern/vfs_subr.c | 24 | ||||
-rw-r--r-- | sys/kern/vnode_if.src | 4 |
2 files changed, 2 insertions, 26 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 454caee..85e1fa1 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -4104,35 +4104,11 @@ vop_strategy_pre(void *ap) void vop_lookup_pre(void *ap) { -#ifdef DEBUG_VFS_LOCKS - struct vop_lookup_args *a; - struct vnode *dvp; - - a = ap; - dvp = a->a_dvp; - ASSERT_VI_UNLOCKED(dvp, "VOP_LOOKUP"); - ASSERT_VOP_LOCKED(dvp, "VOP_LOOKUP"); -#endif } void vop_lookup_post(void *ap, int rc) { -#ifdef DEBUG_VFS_LOCKS - struct vop_lookup_args *a; - struct vnode *dvp; - struct vnode *vp; - - a = ap; - dvp = a->a_dvp; - vp = *(a->a_vpp); - - ASSERT_VI_UNLOCKED(dvp, "VOP_LOOKUP"); - ASSERT_VOP_LOCKED(dvp, "VOP_LOOKUP"); - - if (!rc) - ASSERT_VOP_LOCKED(vp, "VOP_LOOKUP (child)"); -#endif } void diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index 3c3563c..3a5305b 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -63,7 +63,7 @@ vop_islocked { IN struct vnode *vp; }; -%% lookup dvp L ? ? +%% lookup dvp L L L %% lookup vpp - L - %! lookup pre vop_lookup_pre %! lookup post vop_lookup_post @@ -78,7 +78,7 @@ vop_lookup { IN struct componentname *cnp; }; -%% cachedlookup dvp L ? ? +%% cachedlookup dvp L L L %% cachedlookup vpp - L - # This must be an exact copy of lookup. See kern/vfs_cache.c for details. |