diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/node.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c index fb45d88a2446..f5207090885a 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/nodemask.h> | 13 | #include <linux/nodemask.h> |
14 | #include <linux/cpu.h> | 14 | #include <linux/cpu.h> |
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/swap.h> | ||
16 | 17 | ||
17 | static struct sysdev_class node_class = { | 18 | static struct sysdev_class node_class = { |
18 | .name = "node", | 19 | .name = "node", |
@@ -191,6 +192,8 @@ int register_node(struct node *node, int num, struct node *parent) | |||
191 | sysdev_create_file(&node->sysdev, &attr_meminfo); | 192 | sysdev_create_file(&node->sysdev, &attr_meminfo); |
192 | sysdev_create_file(&node->sysdev, &attr_numastat); | 193 | sysdev_create_file(&node->sysdev, &attr_numastat); |
193 | sysdev_create_file(&node->sysdev, &attr_distance); | 194 | sysdev_create_file(&node->sysdev, &attr_distance); |
195 | |||
196 | scan_unevictable_register_node(node); | ||
194 | } | 197 | } |
195 | return error; | 198 | return error; |
196 | } | 199 | } |
@@ -210,6 +213,8 @@ void unregister_node(struct node *node) | |||
210 | sysdev_remove_file(&node->sysdev, &attr_numastat); | 213 | sysdev_remove_file(&node->sysdev, &attr_numastat); |
211 | sysdev_remove_file(&node->sysdev, &attr_distance); | 214 | sysdev_remove_file(&node->sysdev, &attr_distance); |
212 | 215 | ||
216 | scan_unevictable_unregister_node(node); | ||
217 | |||
213 | sysdev_unregister(&node->sysdev); | 218 | sysdev_unregister(&node->sysdev); |
214 | } | 219 | } |
215 | 220 | ||