summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2015-12-19 15:55:43 -0500
committerDavid S. Miller <davem@davemloft.net>2015-12-22 15:23:05 -0500
commitf2830d09895a64ba7a1a2c6ef41106c72e3654b2 (patch)
tree844b428f36bc546fce0601feac5e1bef63ad8b61
parent5c29482dd17835def5cb97918f8f83a881c9918a (diff)
RDS: don't pretend to use cpu notifiers
It looks like an attempt to use CPU notifier here which was never completed. Nobody tried to wire it up completely since 2k9. So I unwind this code and get rid of everything not required. Oh look! 19 lines were removed while code still does the same thing. Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Tested-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/rds/page.c31
1 files changed, 6 insertions, 25 deletions
diff --git a/net/rds/page.c b/net/rds/page.c
index 9005a2c920ee..5a14e6d6a926 100644
--- a/net/rds/page.c
+++ b/net/rds/page.c
@@ -179,37 +179,18 @@ out:
179} 179}
180EXPORT_SYMBOL_GPL(rds_page_remainder_alloc); 180EXPORT_SYMBOL_GPL(rds_page_remainder_alloc);
181 181
182static int rds_page_remainder_cpu_notify(struct notifier_block *self, 182void rds_page_exit(void)
183 unsigned long action, void *hcpu)
184{ 183{
185 struct rds_page_remainder *rem; 184 unsigned int cpu;
186 long cpu = (long)hcpu;
187 185
188 rem = &per_cpu(rds_page_remainders, cpu); 186 for_each_possible_cpu(cpu) {
187 struct rds_page_remainder *rem;
189 188
190 rdsdebug("cpu %ld action 0x%lx\n", cpu, action); 189 rem = &per_cpu(rds_page_remainders, cpu);
190 rdsdebug("cpu %u\n", cpu);
191 191
192 switch (action) {
193 case CPU_DEAD:
194 if (rem->r_page) 192 if (rem->r_page)
195 __free_page(rem->r_page); 193 __free_page(rem->r_page);
196 rem->r_page = NULL; 194 rem->r_page = NULL;
197 break;
198 } 195 }
199
200 return 0;
201}
202
203static struct notifier_block rds_page_remainder_nb = {
204 .notifier_call = rds_page_remainder_cpu_notify,
205};
206
207void rds_page_exit(void)
208{
209 int i;
210
211 for_each_possible_cpu(i)
212 rds_page_remainder_cpu_notify(&rds_page_remainder_nb,
213 (unsigned long)CPU_DEAD,
214 (void *)(long)i);
215} 196}