forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/drivers/md/bcache/closure.c
....@@ -45,7 +45,6 @@
4545 {
4646 closure_put_after_sub(cl, atomic_sub_return(v, &cl->remaining));
4747 }
48
-EXPORT_SYMBOL(closure_sub);
4948
5049 /*
5150 * closure_put - decrement a closure's refcount
....@@ -54,7 +53,6 @@
5453 {
5554 closure_put_after_sub(cl, atomic_dec_return(&cl->remaining));
5655 }
57
-EXPORT_SYMBOL(closure_put);
5856
5957 /*
6058 * closure_wake_up - wake up all closures on a wait list, without memory barrier
....@@ -76,7 +74,6 @@
7674 closure_sub(cl, CLOSURE_WAITING + 1);
7775 }
7876 }
79
-EXPORT_SYMBOL(__closure_wake_up);
8077
8178 /**
8279 * closure_wait - add a closure to a waitlist
....@@ -96,7 +93,6 @@
9693
9794 return true;
9895 }
99
-EXPORT_SYMBOL(closure_wait);
10096
10197 struct closure_syncer {
10298 struct task_struct *task;
....@@ -131,7 +127,6 @@
131127
132128 __set_current_state(TASK_RUNNING);
133129 }
134
-EXPORT_SYMBOL(__closure_sync);
135130
136131 #ifdef CONFIG_BCACHE_CLOSURES_DEBUG
137132
....@@ -149,7 +144,6 @@
149144 list_add(&cl->all, &closure_list);
150145 spin_unlock_irqrestore(&closure_list_lock, flags);
151146 }
152
-EXPORT_SYMBOL(closure_debug_create);
153147
154148 void closure_debug_destroy(struct closure *cl)
155149 {
....@@ -162,11 +156,10 @@
162156 list_del(&cl->all);
163157 spin_unlock_irqrestore(&closure_list_lock, flags);
164158 }
165
-EXPORT_SYMBOL(closure_debug_destroy);
166159
167160 static struct dentry *closure_debug;
168161
169
-static int debug_seq_show(struct seq_file *f, void *data)
162
+static int debug_show(struct seq_file *f, void *data)
170163 {
171164 struct closure *cl;
172165
....@@ -195,17 +188,7 @@
195188 return 0;
196189 }
197190
198
-static int debug_seq_open(struct inode *inode, struct file *file)
199
-{
200
- return single_open(file, debug_seq_show, NULL);
201
-}
202
-
203
-static const struct file_operations debug_ops = {
204
- .owner = THIS_MODULE,
205
- .open = debug_seq_open,
206
- .read = seq_read,
207
- .release = single_release
208
-};
191
+DEFINE_SHOW_ATTRIBUTE(debug);
209192
210193 void __init closure_debug_init(void)
211194 {
....@@ -216,7 +199,7 @@
216199 * about this.
217200 */
218201 closure_debug = debugfs_create_file(
219
- "closures", 0400, bcache_debug, NULL, &debug_ops);
202
+ "closures", 0400, bcache_debug, NULL, &debug_fops);
220203 }
221204 #endif
222205