Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
[pandora-kernel.git] / arch / sparc64 / kernel / sys_sunos32.c
index bfa4aa6..87ebdf8 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/types.h>
+#include <linux/capability.h>
 #include <linux/compat.h>
 #include <linux/mman.h>
 #include <linux/mm.h>
@@ -154,7 +155,7 @@ asmlinkage int sunos_brk(u32 baddr)
         * simple, it hopefully works in most obvious cases.. Easy to
         * fool it, but this should catch most mistakes.
         */
-       freepages = get_page_cache_size();
+       freepages = global_page_state(NR_FILE_PAGES);
        freepages >>= 1;
        freepages += nr_free_pages();
        freepages += nr_swap_pages;