[PATCH][2.5][3/5] CPU Hotplug fs/

From: Zwane Mwaikambo (zwane@holomorphy.com)
Date: Mon Feb 17 2003 - 03:14:19 EST


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

Index: linux-2.5.61-trojan/fs/buffer.c
===================================================================
RCS file: /build/cvsroot/linux-2.5.61/fs/buffer.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 buffer.c
--- linux-2.5.61-trojan/fs/buffer.c 15 Feb 2003 12:32:24 -0000 1.1.1.1
+++ linux-2.5.61-trojan/fs/buffer.c 15 Feb 2003 19:35:22 -0000
@@ -2866,7 +2866,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)
 {
@@ -2874,6 +2885,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/



This archive was generated by hypermail 2b29 : Sun Feb 23 2003 - 22:00:16 EST