diff options
author | Tejun Heo <tj@kernel.org> | 2014-01-10 08:57:20 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-10 16:44:25 -0500 |
commit | a69d001cfc712b96ec9d7ba44d6285702a38dabf (patch) | |
tree | 295a4f2c57a883d45596078a28278cb054bf9a02 /include/linux/kernfs.h | |
parent | ea1c472dfeada211a0100daa7976e8e8e779b858 (diff) |
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 and use
KERNFS_LOCKDEP in kernfs_deactivate() too.
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.
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.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h index 232f1a632383..42ad32ff22f8 100644 --- a/include/linux/kernfs.h +++ b/include/linux/kernfs.h | |||
@@ -34,7 +34,6 @@ enum kernfs_node_type { | |||
34 | }; | 34 | }; |
35 | 35 | ||
36 | #define KERNFS_TYPE_MASK 0x000f | 36 | #define KERNFS_TYPE_MASK 0x000f |
37 | #define KERNFS_ACTIVE_REF KERNFS_FILE | ||
38 | #define KERNFS_FLAG_MASK ~KERNFS_TYPE_MASK | 37 | #define KERNFS_FLAG_MASK ~KERNFS_TYPE_MASK |
39 | 38 | ||
40 | enum kernfs_node_flag { | 39 | enum kernfs_node_flag { |