patch-1.3.43 linux/mm/swap.c

Next file: linux/net/ipv4/arp.c
Previous file: linux/mm/mmap.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.42/linux/mm/swap.c linux/mm/swap.c
@@ -566,15 +566,10 @@
 	unsigned long end;
 
 	/* Don't swap out areas like shared memory which have their
-	    own separate swapping mechanism. */
-	if (vma->vm_flags & VM_SHM)
+	    own separate swapping mechanism or areas which are locked down */
+	if (vma->vm_flags & (VM_SHM | VM_LOCKED))
 		return 0;
 
-	/* Don't swap out areas like shared memory which have their
-           own separate swapping mechanism. */
-	if (vma->vm_flags & VM_DONTSWAP)
-		return 0;
-	
 	end = vma->vm_end;
 	while (start < end) {
 		int result = swap_out_pgd(tsk, vma, pgdir, start, end, limit);

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