Commit f2830d09 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by David S. Miller

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: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
Tested-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5c29482d
......@@ -179,37 +179,18 @@ int rds_page_remainder_alloc(struct scatterlist *scat, unsigned long bytes,
}
EXPORT_SYMBOL_GPL(rds_page_remainder_alloc);
static int rds_page_remainder_cpu_notify(struct notifier_block *self,
unsigned long action, void *hcpu)
void rds_page_exit(void)
{
unsigned int cpu;
for_each_possible_cpu(cpu) {
struct rds_page_remainder *rem;
long cpu = (long)hcpu;
rem = &per_cpu(rds_page_remainders, cpu);
rdsdebug("cpu %u\n", cpu);
rdsdebug("cpu %ld action 0x%lx\n", cpu, action);
switch (action) {
case CPU_DEAD:
if (rem->r_page)
__free_page(rem->r_page);
rem->r_page = NULL;
break;
}
return 0;
}
static struct notifier_block rds_page_remainder_nb = {
.notifier_call = rds_page_remainder_cpu_notify,
};
void rds_page_exit(void)
{
int i;
for_each_possible_cpu(i)
rds_page_remainder_cpu_notify(&rds_page_remainder_nb,
(unsigned long)CPU_DEAD,
(void *)(long)i);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment