.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* General filesystem local caching manager |
---|
2 | 3 | * |
---|
3 | 4 | * Copyright (C) 2004-2007 Red Hat, Inc. All Rights Reserved. |
---|
4 | 5 | * 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. |
---|
10 | 6 | */ |
---|
11 | 7 | |
---|
12 | 8 | #define FSCACHE_DEBUG_LEVEL CACHE |
---|
.. | .. |
---|
45 | 41 | struct workqueue_struct *fscache_object_wq; |
---|
46 | 42 | struct workqueue_struct *fscache_op_wq; |
---|
47 | 43 | |
---|
48 | | -DEFINE_PER_CPU(wait_queue_head_t, fscache_object_cong_wait); |
---|
49 | | - |
---|
50 | 44 | /* these values serve as lower bounds, will be adjusted in fscache_init() */ |
---|
51 | 45 | static unsigned fscache_object_max_active = 4; |
---|
52 | 46 | static unsigned fscache_op_max_active = 2; |
---|
.. | .. |
---|
55 | 49 | static struct ctl_table_header *fscache_sysctl_header; |
---|
56 | 50 | |
---|
57 | 51 | 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) |
---|
60 | 53 | { |
---|
61 | 54 | struct workqueue_struct **wqp = table->extra1; |
---|
62 | 55 | unsigned int *datap = table->data; |
---|
.. | .. |
---|
143 | 136 | static int __init fscache_init(void) |
---|
144 | 137 | { |
---|
145 | 138 | unsigned int nr_cpus = num_possible_cpus(); |
---|
146 | | - unsigned int cpu; |
---|
147 | 139 | int ret; |
---|
148 | 140 | |
---|
149 | 141 | fscache_object_max_active = |
---|
.. | .. |
---|
166 | 158 | if (!fscache_op_wq) |
---|
167 | 159 | goto error_op_wq; |
---|
168 | 160 | |
---|
169 | | - for_each_possible_cpu(cpu) |
---|
170 | | - init_waitqueue_head(&per_cpu(fscache_object_cong_wait, cpu)); |
---|
171 | | - |
---|
172 | 161 | ret = fscache_proc_init(); |
---|
173 | 162 | if (ret < 0) |
---|
174 | 163 | goto error_proc; |
---|
.. | .. |
---|
188 | 177 | ret = -ENOMEM; |
---|
189 | 178 | goto error_cookie_jar; |
---|
190 | 179 | } |
---|
191 | | - fscache_cookie_init(); |
---|
192 | 180 | |
---|
193 | 181 | fscache_root = kobject_create_and_add("fscache", kernel_kobj); |
---|
194 | 182 | if (!fscache_root) |
---|