lkml.org 
[lkml]   [2003]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH][3/6] CPU Hotplug fs/
 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/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.027 / U:4.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site