patch-2.1.123 linux/fs/proc/mem.c
Next file: linux/fs/proc/proc_devtree.c
Previous file: linux/fs/proc/link.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Wed Sep 23 15:24:37 1998
- Orig file:
v2.1.122/linux/fs/proc/mem.c
- Orig date:
Wed Aug 26 11:37:43 1998
diff -u --recursive --new-file v2.1.122/linux/fs/proc/mem.c linux/fs/proc/mem.c
@@ -215,7 +215,7 @@
pgd_t *src_dir, *dest_dir;
pmd_t *src_middle, *dest_middle;
pte_t *src_table, *dest_table;
- unsigned long stmp, dtmp;
+ unsigned long stmp, dtmp, mapnr;
struct vm_area_struct *src_vma = NULL;
struct inode *inode = file->f_dentry->d_inode;
@@ -296,7 +296,9 @@
set_pte(src_table, pte_mkdirty(*src_table));
set_pte(dest_table, *src_table);
- atomic_inc(&mem_map[MAP_NR(pte_page(*src_table))].count);
+ mapnr = MAP_NR(pte_page(*src_table));
+ if (mapnr < max_mapnr)
+ atomic_inc(&mem_map[MAP_NR(pte_page(*src_table))].count);
stmp += PAGE_SIZE;
dtmp += PAGE_SIZE;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov