aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/proc/array.c8
-rw-r--r--fs/proc/base.c4
-rw-r--r--fs/proc/internal.h3
3 files changed, 9 insertions, 6 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 7e9f3b65f25b..5540e9575c6d 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -563,7 +563,8 @@ int proc_tgid_stat(struct seq_file *m, struct pid_namespace *ns,
563 return do_task_stat(m, ns, pid, task, 1); 563 return do_task_stat(m, ns, pid, task, 1);
564} 564}
565 565
566int proc_pid_statm(struct task_struct *task, char *buffer) 566int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
567 struct pid *pid, struct task_struct *task)
567{ 568{
568 int size = 0, resident = 0, shared = 0, text = 0, lib = 0, data = 0; 569 int size = 0, resident = 0, shared = 0, text = 0, lib = 0, data = 0;
569 struct mm_struct *mm = get_task_mm(task); 570 struct mm_struct *mm = get_task_mm(task);
@@ -572,7 +573,8 @@ int proc_pid_statm(struct task_struct *task, char *buffer)
572 size = task_statm(mm, &shared, &text, &data, &resident); 573 size = task_statm(mm, &shared, &text, &data, &resident);
573 mmput(mm); 574 mmput(mm);
574 } 575 }
576 seq_printf(m, "%d %d %d %d %d %d %d\n",
577 size, resident, shared, text, lib, data, 0);
575 578
576 return sprintf(buffer, "%d %d %d %d %d %d %d\n", 579 return 0;
577 size, resident, shared, text, lib, data, 0);
578} 580}
diff --git a/fs/proc/base.c b/fs/proc/base.c
index f77818ecaa8a..9c3e548a6754 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2281,7 +2281,7 @@ static const struct pid_entry tgid_base_stuff[] = {
2281#endif 2281#endif
2282 INF("cmdline", S_IRUGO, pid_cmdline), 2282 INF("cmdline", S_IRUGO, pid_cmdline),
2283 ONE("stat", S_IRUGO, tgid_stat), 2283 ONE("stat", S_IRUGO, tgid_stat),
2284 INF("statm", S_IRUGO, pid_statm), 2284 ONE("statm", S_IRUGO, pid_statm),
2285 REG("maps", S_IRUGO, maps), 2285 REG("maps", S_IRUGO, maps),
2286#ifdef CONFIG_NUMA 2286#ifdef CONFIG_NUMA
2287 REG("numa_maps", S_IRUGO, numa_maps), 2287 REG("numa_maps", S_IRUGO, numa_maps),
@@ -2612,7 +2612,7 @@ static const struct pid_entry tid_base_stuff[] = {
2612#endif 2612#endif
2613 INF("cmdline", S_IRUGO, pid_cmdline), 2613 INF("cmdline", S_IRUGO, pid_cmdline),
2614 ONE("stat", S_IRUGO, tid_stat), 2614 ONE("stat", S_IRUGO, tid_stat),
2615 INF("statm", S_IRUGO, pid_statm), 2615 ONE("statm", S_IRUGO, pid_statm),
2616 REG("maps", S_IRUGO, maps), 2616 REG("maps", S_IRUGO, maps),
2617#ifdef CONFIG_NUMA 2617#ifdef CONFIG_NUMA
2618 REG("numa_maps", S_IRUGO, numa_maps), 2618 REG("numa_maps", S_IRUGO, numa_maps),
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index f1cc6f1f4e34..45bdbfc704e7 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -54,7 +54,8 @@ extern int proc_tid_stat(struct seq_file *m, struct pid_namespace *ns,
54extern int proc_tgid_stat(struct seq_file *m, struct pid_namespace *ns, 54extern int proc_tgid_stat(struct seq_file *m, struct pid_namespace *ns,
55 struct pid *pid, struct task_struct *task); 55 struct pid *pid, struct task_struct *task);
56extern int proc_pid_status(struct task_struct *, char *); 56extern int proc_pid_status(struct task_struct *, char *);
57extern int proc_pid_statm(struct task_struct *, char *); 57extern int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
58 struct pid *pid, struct task_struct *task);
58extern loff_t mem_lseek(struct file *file, loff_t offset, int orig); 59extern loff_t mem_lseek(struct file *file, loff_t offset, int orig);
59 60
60extern const struct file_operations proc_maps_operations; 61extern const struct file_operations proc_maps_operations;