[PATCH][3/6] CPU Hotplug fs/

Zwane Mwaikambo (zwane@holomorphy.com)
Mon, 3 Feb 2003 06:35:51 -0500 (EST)


buffer.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletion(-)

Index: linux-2.5.59-lch2/fs/buffer.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.59/fs/buffer.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 buffer.c
--- linux-2.5.59-lch2/fs/buffer.c 17 Jan 2003 11:16:13 -0000 1.1.1.1
+++ linux-2.5.59-lch2/fs/buffer.c 3 Feb 2003 11:06:59 -0000
@@ -2873,7 +2873,18 @@
bha->ratelimit = 0;
memset(bhl, 0, sizeof(*bhl));
}
-
+
+static void buffer_exit_cpu(int cpu)
+{
+ int i;
+ struct bh_lru *b = &per_cpu(bh_lrus, cpu);
+
+ for (i = 0; i < BH_LRU_SIZE; i++) {
+ brelse(b->bhs[i]);
+ b->bhs[i] = NULL;
+ }
+}
+
static int __devinit buffer_cpu_notify(struct notifier_block *self,
unsigned long action, void *hcpu)
{
@@ -2881,6 +2892,9 @@
switch(action) {
case CPU_UP_PREPARE:
buffer_init_cpu(cpu);
+ break;
+ case CPU_OFFLINE:
+ buffer_exit_cpu(cpu);
break;
default:
break;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/