File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,12 +108,6 @@ int debugfs_file_get(struct dentry *dentry)
108108 kfree (fsd );
109109 fsd = READ_ONCE (dentry -> d_fsdata );
110110 }
111- #ifdef CONFIG_LOCKDEP
112- fsd -> lock_name = kasprintf (GFP_KERNEL , "debugfs:%pd" , dentry );
113- lockdep_register_key (& fsd -> key );
114- lockdep_init_map (& fsd -> lockdep_map , fsd -> lock_name ?: "debugfs" ,
115- & fsd -> key , 0 );
116- #endif
117111 INIT_LIST_HEAD (& fsd -> cancellations );
118112 mutex_init (& fsd -> cancellations_mtx );
119113 }
@@ -132,8 +126,6 @@ int debugfs_file_get(struct dentry *dentry)
132126 if (!refcount_inc_not_zero (& fsd -> active_users ))
133127 return - EIO ;
134128
135- lock_map_acquire_read (& fsd -> lockdep_map );
136-
137129 return 0 ;
138130}
139131EXPORT_SYMBOL_GPL (debugfs_file_get );
@@ -151,8 +143,6 @@ void debugfs_file_put(struct dentry *dentry)
151143{
152144 struct debugfs_fsdata * fsd = READ_ONCE (dentry -> d_fsdata );
153145
154- lock_map_release (& fsd -> lockdep_map );
155-
156146 if (refcount_dec_and_test (& fsd -> active_users ))
157147 complete (& fsd -> active_users_drained );
158148}
Original file line number Diff line number Diff line change @@ -243,10 +243,6 @@ static void debugfs_release_dentry(struct dentry *dentry)
243243
244244 /* check it wasn't a dir (no fsdata) or automount (no real_fops) */
245245 if (fsd && fsd -> real_fops ) {
246- #ifdef CONFIG_LOCKDEP
247- lockdep_unregister_key (& fsd -> key );
248- kfree (fsd -> lock_name );
249- #endif
250246 WARN_ON (!list_empty (& fsd -> cancellations ));
251247 mutex_destroy (& fsd -> cancellations_mtx );
252248 }
@@ -755,9 +751,6 @@ static void __debugfs_file_removed(struct dentry *dentry)
755751 if ((unsigned long )fsd & DEBUGFS_FSDATA_IS_REAL_FOPS_BIT )
756752 return ;
757753
758- lock_map_acquire (& fsd -> lockdep_map );
759- lock_map_release (& fsd -> lockdep_map );
760-
761754 /* if we hit zero, just wait for all to finish */
762755 if (!refcount_dec_and_test (& fsd -> active_users )) {
763756 wait_for_completion (& fsd -> active_users_drained );
Original file line number Diff line number Diff line change 77
88#ifndef _DEBUGFS_INTERNAL_H_
99#define _DEBUGFS_INTERNAL_H_
10- #include <linux/lockdep.h>
1110#include <linux/list.h>
1211
1312struct file_operations ;
@@ -25,11 +24,6 @@ struct debugfs_fsdata {
2524 struct {
2625 refcount_t active_users ;
2726 struct completion active_users_drained ;
28- #ifdef CONFIG_LOCKDEP
29- struct lockdep_map lockdep_map ;
30- struct lock_class_key key ;
31- char * lock_name ;
32- #endif
3327
3428 /* protect cancellations */
3529 struct mutex cancellations_mtx ;
You can’t perform that action at this time.
0 commit comments