forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 958e46acc8e900e8569dd467c1af9b8d2d019394
kernel/fs/fscache/main.c
....@@ -1,12 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /* General filesystem local caching manager
23 *
34 * Copyright (C) 2004-2007 Red Hat, Inc. All Rights Reserved.
45 * Written by David Howells (dhowells@redhat.com)
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License
8
- * as published by the Free Software Foundation; either version
9
- * 2 of the License, or (at your option) any later version.
106 */
117
128 #define FSCACHE_DEBUG_LEVEL CACHE
....@@ -45,8 +41,6 @@
4541 struct workqueue_struct *fscache_object_wq;
4642 struct workqueue_struct *fscache_op_wq;
4743
48
-DEFINE_PER_CPU(wait_queue_head_t, fscache_object_cong_wait);
49
-
5044 /* these values serve as lower bounds, will be adjusted in fscache_init() */
5145 static unsigned fscache_object_max_active = 4;
5246 static unsigned fscache_op_max_active = 2;
....@@ -55,8 +49,7 @@
5549 static struct ctl_table_header *fscache_sysctl_header;
5650
5751 static int fscache_max_active_sysctl(struct ctl_table *table, int write,
58
- void __user *buffer,
59
- size_t *lenp, loff_t *ppos)
52
+ void *buffer, size_t *lenp, loff_t *ppos)
6053 {
6154 struct workqueue_struct **wqp = table->extra1;
6255 unsigned int *datap = table->data;
....@@ -143,7 +136,6 @@
143136 static int __init fscache_init(void)
144137 {
145138 unsigned int nr_cpus = num_possible_cpus();
146
- unsigned int cpu;
147139 int ret;
148140
149141 fscache_object_max_active =
....@@ -165,9 +157,6 @@
165157 fscache_op_max_active);
166158 if (!fscache_op_wq)
167159 goto error_op_wq;
168
-
169
- for_each_possible_cpu(cpu)
170
- init_waitqueue_head(&per_cpu(fscache_object_cong_wait, cpu));
171160
172161 ret = fscache_proc_init();
173162 if (ret < 0)