From f1382dc4850bb459d24a81c6cb0ef93ea7bd4a79 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 18 Mar 1998 17:17:51 +0000 Subject: o Merge with Linux 2.1.90. o Divide L1 cache sizes by 1024 before printing, makes the numbers a bit more credible ... --- fs/buffer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'fs/buffer.c') diff --git a/fs/buffer.c b/fs/buffer.c index 7e45b223e..ec844de9f 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -731,7 +731,8 @@ static void refill_freelist(int size) /* We are going to try to locate this much memory. */ needed = bdf_prm.b_un.nrefill * size; - while ((nr_free_pages > min_free_pages*2) && + while ((nr_free_pages > freepages.min*2) && + BUFFER_MEM < (buffer_mem.max_percent * num_physpages / 100) && grow_buffers(GFP_BUFFER, size)) { obtained += PAGE_SIZE; if (obtained >= needed) @@ -815,7 +816,8 @@ repeat: * are _any_ free buffers. */ while (obtained < (needed >> 1) && - nr_free_pages > min_free_pages + 5 && + nr_free_pages > freepages.min + 5 && + BUFFER_MEM < (buffer_mem.max_percent * num_physpages / 100) && grow_buffers(GFP_BUFFER, size)) obtained += PAGE_SIZE; -- cgit v1.2.3