|
@@ -1602,10 +1602,18 @@ void writeback_set_ratelimit(void)
|
|
|
}
|
|
|
|
|
|
static int __cpuinit
|
|
|
-ratelimit_handler(struct notifier_block *self, unsigned long u, void *v)
|
|
|
+ratelimit_handler(struct notifier_block *self, unsigned long action,
|
|
|
+ void *hcpu)
|
|
|
{
|
|
|
- writeback_set_ratelimit();
|
|
|
- return NOTIFY_DONE;
|
|
|
+
|
|
|
+ switch (action & ~CPU_TASKS_FROZEN) {
|
|
|
+ case CPU_ONLINE:
|
|
|
+ case CPU_DEAD:
|
|
|
+ writeback_set_ratelimit();
|
|
|
+ return NOTIFY_OK;
|
|
|
+ default:
|
|
|
+ return NOTIFY_DONE;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
static struct notifier_block __cpuinitdata ratelimit_nb = {
|