diff options
Diffstat (limited to 'fs/proc/proc_misc.c')
-rw-r--r-- | fs/proc/proc_misc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 74a323d2b850..7e277f2ad466 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 | ||
@@ -716,7 +716,7 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf, | |||
716 | pfn = src / KPMSIZE; | 716 | pfn = src / KPMSIZE; |
717 | count = min_t(size_t, count, (max_pfn * KPMSIZE) - src); | 717 | count = min_t(size_t, count, (max_pfn * KPMSIZE) - src); |
718 | if (src & KPMMASK || count & KPMMASK) | 718 | if (src & KPMMASK || count & KPMMASK) |
719 | return -EIO; | 719 | return -EINVAL; |
720 | 720 | ||
721 | while (count > 0) { | 721 | while (count > 0) { |
722 | ppage = NULL; | 722 | ppage = NULL; |
@@ -726,7 +726,7 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf, | |||
726 | if (!ppage) | 726 | if (!ppage) |
727 | pcount = 0; | 727 | pcount = 0; |
728 | else | 728 | else |
729 | pcount = atomic_read(&ppage->_count); | 729 | pcount = page_mapcount(ppage); |
730 | 730 | ||
731 | if (put_user(pcount, out++)) { | 731 | if (put_user(pcount, out++)) { |
732 | ret = -EFAULT; | 732 | ret = -EFAULT; |
@@ -782,7 +782,7 @@ static ssize_t kpageflags_read(struct file *file, char __user *buf, | |||
782 | pfn = src / KPMSIZE; | 782 | pfn = src / KPMSIZE; |
783 | count = min_t(unsigned long, count, (max_pfn * KPMSIZE) - src); | 783 | count = min_t(unsigned long, count, (max_pfn * KPMSIZE) - src); |
784 | if (src & KPMMASK || count & KPMMASK) | 784 | if (src & KPMMASK || count & KPMMASK) |
785 | return -EIO; | 785 | return -EINVAL; |
786 | 786 | ||
787 | while (count > 0) { | 787 | while (count > 0) { |
788 | ppage = NULL; | 788 | ppage = NULL; |