From 7b255097ebe2ad41b82191fdf0e25245946ea95e Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Thu, 4 Aug 2016 13:45:18 +0000 Subject: [PATCH] Remove unused - never actually implemented - vnode lock types from vnode_if.src. MFC after: 1 month --- sys/kern/vfs_subr.c | 19 ------------------- sys/kern/vnode_if.src | 3 --- sys/sys/vnode.h | 18 ------------------ 3 files changed, 40 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 0b73d14d77a..14991f2d8a5 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -4465,25 +4465,6 @@ assert_vop_elocked(struct vnode *vp, const char *str) if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) != LK_EXCLUSIVE) vfs_badlock("is not exclusive locked but should be", str, vp); } - -#if 0 -void -assert_vop_elocked_other(struct vnode *vp, const char *str) -{ - - if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) != LK_EXCLOTHER) - vfs_badlock("is not exclusive locked by another thread", - str, vp); -} - -void -assert_vop_slocked(struct vnode *vp, const char *str) -{ - - if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) != LK_SHARED) - vfs_badlock("is not locked shared but should be", str, vp); -} -#endif /* 0 */ #endif /* DEBUG_VFS_LOCKS */ void diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index 0350e0e0aec..b55336255e9 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -40,10 +40,7 @@ # # The locking value can take the following values: # L: locked; not converted to type of lock. -# A: any lock type. -# S: locked with shared lock. # E: locked with exclusive lock for this process. -# O: locked with exclusive lock for other process. # U: unlocked. # -: not applicable. vnode does not yet (or no longer) exists. # =: the same on input and output, may be either L or U. diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 2319fdbb817..eb0672eb300 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -517,25 +517,13 @@ extern struct vnodeop_desc *vnodeop_descs[]; void assert_vi_locked(struct vnode *vp, const char *str); void assert_vi_unlocked(struct vnode *vp, const char *str); void assert_vop_elocked(struct vnode *vp, const char *str); -#if 0 -void assert_vop_elocked_other(struct vnode *vp, const char *str); -#endif void assert_vop_locked(struct vnode *vp, const char *str); -#if 0 -voi0 assert_vop_slocked(struct vnode *vp, const char *str); -#endif void assert_vop_unlocked(struct vnode *vp, const char *str); #define ASSERT_VI_LOCKED(vp, str) assert_vi_locked((vp), (str)) #define ASSERT_VI_UNLOCKED(vp, str) assert_vi_unlocked((vp), (str)) #define ASSERT_VOP_ELOCKED(vp, str) assert_vop_elocked((vp), (str)) -#if 0 -#define ASSERT_VOP_ELOCKED_OTHER(vp, str) assert_vop_locked_other((vp), (str)) -#endif #define ASSERT_VOP_LOCKED(vp, str) assert_vop_locked((vp), (str)) -#if 0 -#define ASSERT_VOP_SLOCKED(vp, str) assert_vop_slocked((vp), (str)) -#endif #define ASSERT_VOP_UNLOCKED(vp, str) assert_vop_unlocked((vp), (str)) #else /* !DEBUG_VFS_LOCKS */ @@ -543,13 +531,7 @@ void assert_vop_unlocked(struct vnode *vp, const char *str); #define ASSERT_VI_LOCKED(vp, str) ((void)0) #define ASSERT_VI_UNLOCKED(vp, str) ((void)0) #define ASSERT_VOP_ELOCKED(vp, str) ((void)0) -#if 0 -#define ASSERT_VOP_ELOCKED_OTHER(vp, str) -#endif #define ASSERT_VOP_LOCKED(vp, str) ((void)0) -#if 0 -#define ASSERT_VOP_SLOCKED(vp, str) -#endif #define ASSERT_VOP_UNLOCKED(vp, str) ((void)0) #endif /* DEBUG_VFS_LOCKS */