Skip to contentSkip to conversation

kernfs: Change kernfs_node lockdep name to "kn->active"

PATCH In review Waiman Long 2 participants 2 messages Apr 2, 2020 – Apr 3, 2020 kernfs

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernfs: Change kernfs_node lockdep name to "kn->active"

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.

---
 fs/kernfs/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/kernfs/file.c +1 -1
index 34366db3620d..fd6ddfe4cd94 100644
@@ -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
Signature · 1 line
2.18.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Waiman Long

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.

Thanks.

Signature · 1 line
tejun