aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/proc_misc.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-16 05:27:53 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-16 05:27:53 -0400
commitc54f9da1c8ceee19436430afac0798a989eb886d (patch)
tree412f51c3f2641e4205b767cec95ce6107cd39d36 /fs/proc/proc_misc.c
parenta2eddfa95919a730e0e5ed17e9c303fe5ba249cd (diff)
parent066519068ad2fbe98c7f45552b1f592903a9c8c8 (diff)
Merge branch 'linus' into x86/irqstats
Diffstat (limited to 'fs/proc/proc_misc.c')
-rw-r--r--fs/proc/proc_misc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 903e617bec5..53cb3f89f2c 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -139,7 +139,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
139#define K(x) ((x) << (PAGE_SHIFT - 10)) 139#define K(x) ((x) << (PAGE_SHIFT - 10))
140 si_meminfo(&i); 140 si_meminfo(&i);
141 si_swapinfo(&i); 141 si_swapinfo(&i);
142 committed = atomic_read(&vm_committed_space); 142 committed = atomic_long_read(&vm_committed_space);
143 allowed = ((totalram_pages - hugetlb_total_pages()) 143 allowed = ((totalram_pages - hugetlb_total_pages())
144 * sysctl_overcommit_ratio / 100) + total_swap_pages; 144 * sysctl_overcommit_ratio / 100) + total_swap_pages;
145 145
@@ -725,7 +725,7 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf,
725 pfn = src / KPMSIZE; 725 pfn = src / KPMSIZE;
726 count = min_t(size_t, count, (max_pfn * KPMSIZE) - src); 726 count = min_t(size_t, count, (max_pfn * KPMSIZE) - src);
727 if (src & KPMMASK || count & KPMMASK) 727 if (src & KPMMASK || count & KPMMASK)
728 return -EIO; 728 return -EINVAL;
729 729
730 while (count > 0) { 730 while (count > 0) {
731 ppage = NULL; 731 ppage = NULL;
@@ -735,7 +735,7 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf,
735 if (!ppage) 735 if (!ppage)
736 pcount = 0; 736 pcount = 0;
737 else 737 else
738 pcount = atomic_read(&ppage->_count); 738 pcount = page_mapcount(ppage);
739 739
740 if (put_user(pcount, out++)) { 740 if (put_user(pcount, out++)) {
741 ret = -EFAULT; 741 ret = -EFAULT;
@@ -791,7 +791,7 @@ static ssize_t kpageflags_read(struct file *file, char __user *buf,
791 pfn = src / KPMSIZE; 791 pfn = src / KPMSIZE;
792 count = min_t(unsigned long, count, (max_pfn * KPMSIZE) - src); 792 count = min_t(unsigned long, count, (max_pfn * KPMSIZE) - src);
793 if (src & KPMMASK || count & KPMMASK) 793 if (src & KPMMASK || count & KPMMASK)
794 return -EIO; 794 return -EINVAL;
795 795
796 while (count > 0) { 796 while (count > 0) {
797 ppage = NULL; 797 ppage = NULL;