Index: linux-2.6.15-rc2/fs/proc/proc_misc.c =================================================================== --- linux-2.6.15-rc2.orig/fs/proc/proc_misc.c 2005-11-20 03:25:03.000000000 +0000 +++ linux-2.6.15-rc2/fs/proc/proc_misc.c 2005-11-23 05:42:10.000000000 +0000 @@ -142,7 +142,7 @@ static int meminfo_read_proc(char *page, allowed = ((totalram_pages - hugetlb_total_pages()) * sysctl_overcommit_ratio / 100) + total_swap_pages; - cached = get_page_cache_size() - total_swapcache_pages - i.bufferram; + cached = ps.nr_page - total_swapcache_pages - i.bufferram; if (cached < 0) cached = 0; Index: linux-2.6.15-rc2/include/linux/pagemap.h =================================================================== --- linux-2.6.15-rc2.orig/include/linux/pagemap.h 2005-11-23 05:32:53.000000000 +0000 +++ linux-2.6.15-rc2/include/linux/pagemap.h 2005-11-23 05:40:46.000000000 +0000 @@ -99,11 +99,6 @@ int add_to_page_cache_lru(struct page *p extern void remove_from_page_cache(struct page *page); extern void __remove_from_page_cache(struct page *page); -static inline unsigned long get_page_cache_size(void) -{ - return read_page_state(nr_pagecache); -} - /* * Return byte-offset into filesystem object for page. */ Index: linux-2.6.15-rc2/mm/mmap.c =================================================================== --- linux-2.6.15-rc2.orig/mm/mmap.c 2005-11-20 03:25:03.000000000 +0000 +++ linux-2.6.15-rc2/mm/mmap.c 2005-11-23 05:48:09.000000000 +0000 @@ -95,7 +95,7 @@ int __vm_enough_memory(long pages, int c if (sysctl_overcommit_memory == OVERCOMMIT_GUESS) { unsigned long n; - free = get_page_cache_size(); + free = read_page_state(nr_pagecache); free += nr_swap_pages; /*