File tree Expand file tree Collapse file tree 3 files changed +0
-23
lines changed Expand file tree Collapse file tree 3 files changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -108,12 +108,6 @@ int debugfs_file_get(struct dentry *dentry)
108
108
kfree (fsd );
109
109
fsd = READ_ONCE (dentry -> d_fsdata );
110
110
}
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
117
111
INIT_LIST_HEAD (& fsd -> cancellations );
118
112
mutex_init (& fsd -> cancellations_mtx );
119
113
}
@@ -132,8 +126,6 @@ int debugfs_file_get(struct dentry *dentry)
132
126
if (!refcount_inc_not_zero (& fsd -> active_users ))
133
127
return - EIO ;
134
128
135
- lock_map_acquire_read (& fsd -> lockdep_map );
136
-
137
129
return 0 ;
138
130
}
139
131
EXPORT_SYMBOL_GPL (debugfs_file_get );
@@ -151,8 +143,6 @@ void debugfs_file_put(struct dentry *dentry)
151
143
{
152
144
struct debugfs_fsdata * fsd = READ_ONCE (dentry -> d_fsdata );
153
145
154
- lock_map_release (& fsd -> lockdep_map );
155
-
156
146
if (refcount_dec_and_test (& fsd -> active_users ))
157
147
complete (& fsd -> active_users_drained );
158
148
}
Original file line number Diff line number Diff line change @@ -243,10 +243,6 @@ static void debugfs_release_dentry(struct dentry *dentry)
243
243
244
244
/* check it wasn't a dir (no fsdata) or automount (no real_fops) */
245
245
if (fsd && fsd -> real_fops ) {
246
- #ifdef CONFIG_LOCKDEP
247
- lockdep_unregister_key (& fsd -> key );
248
- kfree (fsd -> lock_name );
249
- #endif
250
246
WARN_ON (!list_empty (& fsd -> cancellations ));
251
247
mutex_destroy (& fsd -> cancellations_mtx );
252
248
}
@@ -755,9 +751,6 @@ static void __debugfs_file_removed(struct dentry *dentry)
755
751
if ((unsigned long )fsd & DEBUGFS_FSDATA_IS_REAL_FOPS_BIT )
756
752
return ;
757
753
758
- lock_map_acquire (& fsd -> lockdep_map );
759
- lock_map_release (& fsd -> lockdep_map );
760
-
761
754
/* if we hit zero, just wait for all to finish */
762
755
if (!refcount_dec_and_test (& fsd -> active_users )) {
763
756
wait_for_completion (& fsd -> active_users_drained );
Original file line number Diff line number Diff line change 7
7
8
8
#ifndef _DEBUGFS_INTERNAL_H_
9
9
#define _DEBUGFS_INTERNAL_H_
10
- #include <linux/lockdep.h>
11
10
#include <linux/list.h>
12
11
13
12
struct file_operations ;
@@ -25,11 +24,6 @@ struct debugfs_fsdata {
25
24
struct {
26
25
refcount_t active_users ;
27
26
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
33
27
34
28
/* protect cancellations */
35
29
struct mutex cancellations_mtx ;
You can’t perform that action at this time.
0 commit comments