diff -urN ref/fs/dcache.c no-swapout/fs/dcache.c --- ref/fs/dcache.c Fri Jun 23 16:41:04 2000 +++ no-swapout/fs/dcache.c Fri Jun 23 16:41:13 2000 @@ -478,7 +478,7 @@ { if (gfp_mask & __GFP_IO) { int count = 0; - if (priority) + if (priority > 1) count = dentry_stat.nr_unused / priority; prune_dcache(count, -1); } diff -urN ref/ipc/shm.c no-swapout/ipc/shm.c --- ref/ipc/shm.c Fri Jun 23 16:41:05 2000 +++ no-swapout/ipc/shm.c Fri Jun 23 16:41:13 2000 @@ -690,7 +690,7 @@ } /* - * Goes through counter = (shm_rss >> prio) present shm pages. + * Goes through counter = (shm_rss / prio) present shm pages. */ static unsigned long swap_id = 0; /* currently being swapped */ static unsigned long swap_idx = 0; /* next to swap */ @@ -705,7 +705,7 @@ int counter; struct page * page_map; - counter = shm_rss >> prio; + counter = shm_rss / prio; if (!counter || !(swap_nr = get_swap_page())) return 0; diff -urN ref/mm/filemap.c no-swapout/mm/filemap.c --- ref/mm/filemap.c Fri Jun 23 16:41:05 2000 +++ no-swapout/mm/filemap.c Fri Jun 23 16:41:13 2000 @@ -149,7 +149,7 @@ int count; /* Make sure we scan all pages twice at priority 0. */ - count = (limit << 1) >> priority; + count = limit / priority; page = mem_map + clock; do { diff -urN ref/mm/vmscan.c no-swapout/mm/vmscan.c --- ref/mm/vmscan.c Fri Jun 23 16:41:05 2000 +++ no-swapout/mm/vmscan.c Fri Jun 23 16:42:11 2000 @@ -336,7 +336,7 @@ * Think of swap_cnt as a "shadow rss" - it tells us which process * we want to page out (always try largest first). */ - counter = nr_tasks / (priority+1); + counter = nr_tasks / priority; if (counter < 1) counter = 1; @@ -418,15 +418,15 @@ } shrink_dcache_memory(priority, gfp_mask); - } while (--priority >= 0); + } while (--priority > 0); done: unlock_kernel(); - if (priority < 0) + if (!priority) printk("VM: do_try_to_free_pages failed for %s...\n", current->comm); /* Return success if we freed a page. */ - return priority >= 0; + return priority > 0; } /*