summaryrefslogtreecommitdiffstats
path: root/fs/kernfs/file.c
diff options
context:
space:
mode:
authorWaiman Long <longman@redhat.com>2017-08-17 17:49:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-08-28 16:50:15 +0200
commit39bf04db6b2b13eeb2aa565930034dc9d4198d93 (patch)
treee7b5981de4a835d2abff37452dc389489bc74f6e /fs/kernfs/file.c
parentfbdev: uvesafb: remove DRIVER_ATTR() usage (diff)
downloadlinux-39bf04db6b2b13eeb2aa565930034dc9d4198d93.tar.xz
linux-39bf04db6b2b13eeb2aa565930034dc9d4198d93.zip
kernfs: Clarify lockdep name for kn->count
The reference count in kernfs_node structure is treated like a rwsem by using lockdep instrumentation code. The lockdep name, however, is still "s_active" which is carried over from the old sysfs code. As s_active is no longer the variable name, its use may confuse users on where the lock is when it is reported by lockdep. So it is changed to "kn->count" which is how this variable is normally referenced in kernfs code. Signed-off-by: Waiman Long <longman@redhat.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/kernfs/file.c')
-rw-r--r--fs/kernfs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
index ac2dfe0c5a9c..e6c8954a4e89 100644
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -997,7 +997,7 @@ struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
#ifdef CONFIG_DEBUG_LOCK_ALLOC
if (key) {
- lockdep_init_map(&kn->dep_map, "s_active", key, 0);
+ lockdep_init_map(&kn->dep_map, "kn->count", key, 0);
kn->flags |= KERNFS_LOCKDEP;
}
#endif