diff options
| author | 2008-07-08 07:47:47 +0200 | |
|---|---|---|
| committer | 2008-07-08 07:47:47 +0200 | |
| commit | 93022136fff9e6130aa128a5ed8a599e93ac813c (patch) | |
| tree | 185390fb75a3d7423cc508610b76637c957205b9 /fs/proc/proc_misc.c | |
| parent | x86: make 64bit identify_cpu use cpu_dev v2 (diff) | |
| parent | Linux 2.6.26-rc9 (diff) | |
| download | wireguard-linux-93022136fff9e6130aa128a5ed8a599e93ac813c.tar.xz wireguard-linux-93022136fff9e6130aa128a5ed8a599e93ac813c.zip | |
Merge commit 'v2.6.26-rc9' into x86/cpu
Diffstat (limited to 'fs/proc/proc_misc.c')
| -rw-r--r-- | fs/proc/proc_misc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 32dc14cd8900..7e277f2ad466 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c @@ -716,7 +716,7 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf, pfn = src / KPMSIZE; count = min_t(size_t, count, (max_pfn * KPMSIZE) - src); if (src & KPMMASK || count & KPMMASK) - return -EIO; + return -EINVAL; while (count > 0) { ppage = NULL; @@ -726,7 +726,7 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf, if (!ppage) pcount = 0; else - pcount = atomic_read(&ppage->_count); + pcount = page_mapcount(ppage); if (put_user(pcount, out++)) { ret = -EFAULT; @@ -782,7 +782,7 @@ static ssize_t kpageflags_read(struct file *file, char __user *buf, pfn = src / KPMSIZE; count = min_t(unsigned long, count, (max_pfn * KPMSIZE) - src); if (src & KPMMASK || count & KPMMASK) - return -EIO; + return -EINVAL; while (count > 0) { ppage = NULL; |
