diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/kcore.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index eda6f017f272..f6a13f489e30 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/capability.h> | 15 | #include <linux/capability.h> |
16 | #include <linux/elf.h> | 16 | #include <linux/elf.h> |
17 | #include <linux/elfcore.h> | 17 | #include <linux/elfcore.h> |
18 | #include <linux/notifier.h> | ||
18 | #include <linux/vmalloc.h> | 19 | #include <linux/vmalloc.h> |
19 | #include <linux/highmem.h> | 20 | #include <linux/highmem.h> |
20 | #include <linux/printk.h> | 21 | #include <linux/printk.h> |
@@ -564,7 +565,6 @@ static const struct file_operations proc_kcore_operations = { | |||
564 | .llseek = default_llseek, | 565 | .llseek = default_llseek, |
565 | }; | 566 | }; |
566 | 567 | ||
567 | #ifdef CONFIG_MEMORY_HOTPLUG | ||
568 | /* just remember that we have to update kcore */ | 568 | /* just remember that we have to update kcore */ |
569 | static int __meminit kcore_callback(struct notifier_block *self, | 569 | static int __meminit kcore_callback(struct notifier_block *self, |
570 | unsigned long action, void *arg) | 570 | unsigned long action, void *arg) |
@@ -578,8 +578,11 @@ static int __meminit kcore_callback(struct notifier_block *self, | |||
578 | } | 578 | } |
579 | return NOTIFY_OK; | 579 | return NOTIFY_OK; |
580 | } | 580 | } |
581 | #endif | ||
582 | 581 | ||
582 | static struct notifier_block kcore_callback_nb __meminitdata = { | ||
583 | .notifier_call = kcore_callback, | ||
584 | .priority = 0, | ||
585 | }; | ||
583 | 586 | ||
584 | static struct kcore_list kcore_vmalloc; | 587 | static struct kcore_list kcore_vmalloc; |
585 | 588 | ||
@@ -631,7 +634,7 @@ static int __init proc_kcore_init(void) | |||
631 | add_modules_range(); | 634 | add_modules_range(); |
632 | /* Store direct-map area from physical memory map */ | 635 | /* Store direct-map area from physical memory map */ |
633 | kcore_update_ram(); | 636 | kcore_update_ram(); |
634 | hotplug_memory_notifier(kcore_callback, 0); | 637 | register_hotmemory_notifier(&kcore_callback_nb); |
635 | 638 | ||
636 | return 0; | 639 | return 0; |
637 | } | 640 | } |