<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: Rusty Russell &lt;rusty@rustcorp.com.au&gt;

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: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
---

 25-akpm/drivers/base/node.c  |    3 +--
 25-akpm/include/linux/node.h |    1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

diff -puN drivers/base/node.c~read-cpumasks-every-time-when-exporting-through-sysfs drivers/base/node.c
--- 25/drivers/base/node.c~read-cpumasks-every-time-when-exporting-through-sysfs	2004-08-15 18:33:57.527932368 -0700
+++ 25-akpm/drivers/base/node.c	2004-08-15 18:33:57.532931608 -0700
@@ -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-&gt;cpumap;
+	cpumask_t mask = node_to_cpumask(node_dev-&gt;sysdev.id);
 	int len;
 
 	/* 2004/06/03: buf currently PAGE_SIZE, need &gt; 1 char per 4 bits. */
@@ -111,7 +111,6 @@ int __init register_node(struct node *no
 {
 	int error;
 
-	node-&gt;cpumap = node_to_cpumask(num);
 	node-&gt;sysdev.id = num;
 	node-&gt;sysdev.cls = &amp;node_class;
 	error = sysdev_register(&amp;node-&gt;sysdev);
diff -puN include/linux/node.h~read-cpumasks-every-time-when-exporting-through-sysfs include/linux/node.h
--- 25/include/linux/node.h~read-cpumasks-every-time-when-exporting-through-sysfs	2004-08-15 18:33:57.529932064 -0700
+++ 25-akpm/include/linux/node.h	2004-08-15 18:33:57.533931456 -0700
@@ -23,7 +23,6 @@
 #include &lt;linux/cpumask.h&gt;
 
 struct node {
-	cpumask_t cpumap;	/* Bitmap of CPUs on the Node */
 	struct sys_device	sysdev;
 };
 
_
</pre></body></html>