aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernfs.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-02-03 14:02:59 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-07 15:42:40 -0800
commit182fd64b66342219d6fcf2b84d337529d120d95c (patch)
treef8e0377fa5cdf90ea11245fd4f028c07ada4a5cd /include/linux/kernfs.h
parentkernfs: remove kernfs_addrm_cxt (diff)
downloadlinux-dev-182fd64b66342219d6fcf2b84d337529d120d95c.tar.xz
linux-dev-182fd64b66342219d6fcf2b84d337529d120d95c.zip
kernfs: remove KERNFS_ACTIVE_REF and add kernfs_lockdep()
There currently are two mechanisms gating active ref lockdep annotations - KERNFS_LOCKDEP flag and KERNFS_ACTIVE_REF type mask. The former disables lockdep annotations in kernfs_get/put_active() while the latter disables all of kernfs_deactivate(). While KERNFS_ACTIVE_REF also behaves as an optimization to skip the deactivation step for non-file nodes, the benefit is marginal and it needlessly diverges code paths. Let's drop KERNFS_ACTIVE_REF. While at it, add a test helper kernfs_lockdep() to test KERNFS_LOCKDEP flag so that it's more convenient and the related code can be compiled out when not enabled. v2: Refreshed on top of ("kernfs: make kernfs_deactivate() honor KERNFS_LOCKDEP flag"). As the earlier patch already added KERNFS_LOCKDEP tests to kernfs_deactivate(), those additions are dropped from this patch and the existing ones are simply converted to kernfs_lockdep(). Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/kernfs.h')
-rw-r--r--include/linux/kernfs.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h
index 38646f6096bc..dc4cd6c04236 100644
--- a/include/linux/kernfs.h
+++ b/include/linux/kernfs.h
@@ -35,7 +35,6 @@ enum kernfs_node_type {
};
#define KERNFS_TYPE_MASK 0x000f
-#define KERNFS_ACTIVE_REF KERNFS_FILE
#define KERNFS_FLAG_MASK ~KERNFS_TYPE_MASK
enum kernfs_node_flag {