patch-1.3.29 linux/ipc/shm.c

Next file: linux/kernel/ksyms.c
Previous file: linux/include/linux/proc_fs.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.28/linux/ipc/shm.c linux/ipc/shm.c
@@ -664,7 +664,7 @@
 
 done:	/* pte_val(pte) == shp->shm_pages[idx] */
 	current->min_flt++;
-	mem_map[MAP_NR(pte_page(pte))]++;
+	mem_map[MAP_NR(pte_page(pte))].count++;
 	return pte_modify(pte, shmd->vm_page_prot);
 }
 
@@ -764,7 +764,7 @@
 			printk("shm_swap_out: page and pte mismatch\n");
 		set_pte(page_table,
 		  __pte(shmd->vm_pte + SWP_ENTRY(0, idx << SHM_IDX_SHIFT)));
-		mem_map[MAP_NR(pte_page(pte))]--;
+		mem_map[MAP_NR(pte_page(pte))].count--;
 		if (shmd->vm_mm->rss > 0)
 			shmd->vm_mm->rss--;
 		invalid++;
@@ -774,7 +774,7 @@
 		break;
 	}
 
-	if (mem_map[MAP_NR(pte_page(page))] != 1)
+	if (mem_map[MAP_NR(pte_page(page))].count != 1)
 		goto check_table;
 	shp->shm_pages[idx] = swap_nr;
 	if (invalid)

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