summaryrefslogtreecommitdiffstats
path: root/fs/proc/page.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/page.c')
-rw-r--r--fs/proc/page.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/fs/proc/page.c b/fs/proc/page.c
index 544d1ee15aee..7c952ee732e6 100644
--- a/fs/proc/page.c
+++ b/fs/proc/page.c
@@ -42,10 +42,12 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf,
42 return -EINVAL; 42 return -EINVAL;
43 43
44 while (count > 0) { 44 while (count > 0) {
45 if (pfn_valid(pfn)) 45 /*
46 ppage = pfn_to_page(pfn); 46 * TODO: ZONE_DEVICE support requires to identify
47 else 47 * memmaps that were actually initialized.
48 ppage = NULL; 48 */
49 ppage = pfn_to_online_page(pfn);
50
49 if (!ppage || PageSlab(ppage) || page_has_type(ppage)) 51 if (!ppage || PageSlab(ppage) || page_has_type(ppage))
50 pcount = 0; 52 pcount = 0;
51 else 53 else
@@ -216,10 +218,11 @@ static ssize_t kpageflags_read(struct file *file, char __user *buf,
216 return -EINVAL; 218 return -EINVAL;
217 219
218 while (count > 0) { 220 while (count > 0) {
219 if (pfn_valid(pfn)) 221 /*
220 ppage = pfn_to_page(pfn); 222 * TODO: ZONE_DEVICE support requires to identify
221 else 223 * memmaps that were actually initialized.
222 ppage = NULL; 224 */
225 ppage = pfn_to_online_page(pfn);
223 226
224 if (put_user(stable_page_flags(ppage), out)) { 227 if (put_user(stable_page_flags(ppage), out)) {
225 ret = -EFAULT; 228 ret = -EFAULT;
@@ -261,10 +264,11 @@ static ssize_t kpagecgroup_read(struct file *file, char __user *buf,
261 return -EINVAL; 264 return -EINVAL;
262 265
263 while (count > 0) { 266 while (count > 0) {
264 if (pfn_valid(pfn)) 267 /*
265 ppage = pfn_to_page(pfn); 268 * TODO: ZONE_DEVICE support requires to identify
266 else 269 * memmaps that were actually initialized.
267 ppage = NULL; 270 */
271 ppage = pfn_to_online_page(pfn);
268 272
269 if (ppage) 273 if (ppage)
270 ino = page_cgroup_ino(ppage); 274 ino = page_cgroup_ino(ppage);