Commit ad308764 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Read cpumasks every time when exporting through sysfs

Paul Jackson points out that the sysfs code saves a node's cpumask in the
sysfs node, although it can change with CPU hotplug.  Don't do this.
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 597648bb
......@@ -19,7 +19,7 @@ static struct sysdev_class node_class = {
static ssize_t node_read_cpumap(struct sys_device * dev, char * buf)
{
struct node *node_dev = to_node(dev);
cpumask_t mask = node_dev->cpumap;
cpumask_t mask = node_to_cpumask(node_dev->sysdev.id);
int len;
/* 2004/06/03: buf currently PAGE_SIZE, need > 1 char per 4 bits. */
......@@ -111,7 +111,6 @@ int __init register_node(struct node *node, int num, struct node *parent)
{
int error;
node->cpumap = node_to_cpumask(num);
node->sysdev.id = num;
node->sysdev.cls = &node_class;
error = sysdev_register(&node->sysdev);
......
......@@ -23,7 +23,6 @@
#include <linux/cpumask.h>
struct node {
cpumask_t cpumap; /* Bitmap of CPUs on the Node */
struct sys_device sysdev;
};
......
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