summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-15 03:32:22 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-15 03:32:22 +0000
commitf1da2c3860e301527d56a1ef0b56c649ee7c4b1b (patch)
tree562b5d2e8b9cb62eb983d78ff6bcf9789e08fcf6 /mm
parent00f11569ac8ca73cbcdef8822de1583e79aee571 (diff)
Merge with Linux 2.4.0-test5-pre1. This works again on Origin UP.
The IP22 cache bugs which are plaguing some machines are still unfixed.
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c8
-rw-r--r--mm/slab.c2
-rw-r--r--mm/vmscan.c6
3 files changed, 8 insertions, 8 deletions
diff --git a/mm/memory.c b/mm/memory.c
index de7dc07f8..83f1586d4 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -373,12 +373,12 @@ void zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long s
spin_unlock(&mm->page_table_lock);
/*
* Update rss for the mm_struct (not necessarily current->mm)
+ * Notice that rss is an unsigned long.
*/
- if (mm->rss > 0) {
+ if (mm->rss > freed)
mm->rss -= freed;
- if (mm->rss < 0)
- mm->rss = 0;
- }
+ else
+ mm->rss = 0;
}
diff --git a/mm/slab.c b/mm/slab.c
index a24e46582..a31f0f7e7 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1966,7 +1966,7 @@ int slabinfo_read_proc (char *page, char **start, off_t off,
#define MAX_SLABINFO_WRITE 128
/**
* slabinfo_write_proc - SMP tuning for the slab allocator
- * @file:
+ * @file: unused
* @buffer: user buffer
* @count: data len
* @data: unused
diff --git a/mm/vmscan.c b/mm/vmscan.c
index f19721ee5..c43456da6 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -548,9 +548,9 @@ static int do_try_to_free_pages(unsigned int gfp_mask)
if (!--count)
goto done;
}
- /* We return 1 if we are freed some page, or
- * there are no memory pressure remaining */
- return (count != FREE_COUNT || !memory_pressure());
+ /* Return 1 if any page is freed, or
+ * there are no more memory pressure */
+ return (count < FREE_COUNT || !memory_pressure());
done:
return 1;