patch-1.3.54 linux/mm/swap.c

Next file: linux/net/Changes
Previous file: linux/mm/memory.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.53/linux/mm/swap.c linux/mm/swap.c
@@ -1323,17 +1323,11 @@
 	mem_map = (mem_map_t *) start_mem;
 	p = mem_map + MAP_NR(end_mem);
 	start_mem = LONG_ALIGN((unsigned long) p);
-	while (p > mem_map) {
+	memset(mem_map, 0, start_mem - (unsigned long) mem_map);
+	do {
 		--p;
-		p->count = 0;
-		p->dirty = 0;
 		p->reserved = 1;
-		p->inode = NULL;
-		p->offset = 0;
-		p->write_list = NULL;
-		p->next = p->prev = NULL;
-		p->next_hash = p->next_hash = NULL;
-	}
+	} while (p > mem_map);
 
 	for (i = 0 ; i < NR_MEM_LISTS ; i++) {
 		unsigned long bitmap_size;

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