diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-01-21 22:34:01 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-01-21 22:34:01 +0000 |
commit | 9e30c3705aed9fbec4c3304570e4d6e707856bcb (patch) | |
tree | b19e6acb5a67af31a4e7742e05c2166dc3f1444c /mm | |
parent | 72919904796333a20c6a5d5c380091b42e407aa9 (diff) |
Merge with Linux 2.3.22.
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mmap.c | 1 | ||||
-rw-r--r-- | mm/page_io.c | 2 | ||||
-rw-r--r-- | mm/swap_state.c | 3 |
3 files changed, 4 insertions, 2 deletions
@@ -66,7 +66,6 @@ int vm_enough_memory(long pages) free += atomic_read(&page_cache_size); free += nr_free_pages; free += nr_swap_pages; - free -= (page_cache.min_percent + buffer_mem.min_percent + 2)*num_physpages/100; return free > pages; } diff --git a/mm/page_io.c b/mm/page_io.c index 72e8cb95a..c89416bf9 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -118,7 +118,7 @@ static void rw_swap_page_base(int rw, unsigned long entry, struct page *page, in } /* block_size == PAGE_SIZE/zones_used */ - brw_page(rw, page, dev, zones, block_size, 0); + brw_page(rw, page, dev, zones, block_size); /* Note! For consistency we do all of the logic, * decrementing the page count, and unlocking the page in the diff --git a/mm/swap_state.c b/mm/swap_state.c index 5cfc686dd..3b3a65a71 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -13,6 +13,7 @@ #include <linux/swapctl.h> #include <linux/init.h> #include <linux/pagemap.h> +#include <linux/smp_lock.h> #include <asm/pgtable.h> @@ -234,7 +235,9 @@ void __delete_from_swap_cache(struct page *page) page_address(page), page_count(page), entry); #endif remove_from_swap_cache (page); + lock_kernel(); swap_free (entry); + unlock_kernel(); } static void delete_from_swap_cache_nolock(struct page *page) |