diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-01-04 16:03:48 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-01-04 16:03:48 +0000 |
commit | 78c388aed2b7184182c08428db1de6c872d815f5 (patch) | |
tree | 4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /mm/page_io.c | |
parent | eb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff) |
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'mm/page_io.c')
-rw-r--r-- | mm/page_io.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/mm/page_io.c b/mm/page_io.c index 44f592df8..2dd24facc 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -10,21 +10,13 @@ */ #include <linux/mm.h> -#include <linux/sched.h> -#include <linux/kernel.h> #include <linux/kernel_stat.h> -#include <linux/errno.h> -#include <linux/string.h> -#include <linux/stat.h> #include <linux/swap.h> -#include <linux/fs.h> #include <linux/locks.h> #include <linux/swapctl.h> #include <asm/dma.h> -#include <asm/system.h> /* for cli()/sti() */ #include <asm/uaccess.h> /* for copy_to/from_user */ -#include <asm/bitops.h> #include <asm/pgtable.h> static struct wait_queue * lock_queue = NULL; @@ -66,6 +58,11 @@ void rw_swap_page(int rw, unsigned long entry, char * buf, int wait) printk("Internal error: bad swap-device\n"); return; } + + /* Don't allow too many pending pages in flight.. */ + if (atomic_read(&nr_async_pages) > SWAP_CLUSTER_MAX) + wait = 1; + p = &swap_info[type]; offset = SWP_OFFSET(entry); if (offset >= p->max) { |