patch-1.3.74 linux/mm/filemap.c
Next file: linux/mm/kmalloc.c
Previous file: linux/kernel/sys.c
Back to the patch index
Back to the overall index
- Lines: 41
- Date:
Wed Mar 13 13:53:24 1996
- Orig file:
v1.3.73/linux/mm/filemap.c
- Orig date:
Wed Feb 28 11:50:15 1996
diff -u --recursive --new-file v1.3.73/linux/mm/filemap.c linux/mm/filemap.c
@@ -109,25 +109,23 @@
}
}
-int shrink_mmap(int priority, unsigned long limit)
+int shrink_mmap(int priority, int dma)
{
static int clock = 0;
struct page * page;
+ unsigned long limit = MAP_NR(high_memory);
struct buffer_head *tmp, *bh;
- if (limit > high_memory)
- limit = high_memory;
- limit = MAP_NR(limit);
- if (clock >= limit)
- clock = 0;
priority = (limit<<2) >> priority;
page = mem_map + clock;
while (priority-- > 0) {
if (page->locked)
- goto next;
+ goto next;
+ if (dma && !page->dma)
+ goto next;
/* First of all, regenerate the page's referenced bit
from any buffers in the page */
- bh = buffer_pages[MAP_NR(page_address(page))];
+ bh = page->buffers;
if (bh) {
tmp = bh;
do {
@@ -505,7 +503,7 @@
struct inode * inode;
struct buffer_head * bh;
- bh = buffer_pages[MAP_NR(page)];
+ bh = mem_map[MAP_NR(page)].buffers;
if (bh) {
/* whee.. just mark the buffer heads dirty */
struct buffer_head * tmp = bh;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this