kernfs: Change kernfs_node lockdep name to "kn->active"
authorWaiman Long <longman@redhat.com>
Thu, 2 Apr 2020 17:10:56 +0000 (13:10 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Apr 2020 14:59:15 +0000 (16:59 +0200)
The kernfs_node lockdep tracking is being done on kn->active, the
active reference count. The other reference count (kn->count) is not
tracked by lockdep. So change the lockdep name to reflect what it is
tracking.

Signed-off-by: Waiman Long <longman@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20200402171056.27871-1-longman@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/kernfs/file.c

index 34366db3620d6befad97b7055fd524b442729cc0..fd6ddfe4cd94f95710ab153a90467583129a4799 100644 (file)
@@ -1010,7 +1010,7 @@ struct kernfs_node *__kernfs_create_file(struct kernfs_node *parent,
 
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
        if (key) {
-               lockdep_init_map(&kn->dep_map, "kn->count", key, 0);
+               lockdep_init_map(&kn->dep_map, "kn->active", key, 0);
                kn->flags |= KERNFS_LOCKDEP;
        }
 #endif