Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84615
b: refs/heads/master
c: a56d3fc
h: refs/heads/master
i:
  84613: 2127b3e
  84611: 9c99770
  84607: 824f890
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Feb 8, 2008
1 parent 8a56c47 commit fade416
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ee992744ea53db0a90c986fd0a70fbbf91e7f8bd
refs/heads/master: a56d3fc74c0178c5f41c48315604d62cff4e746d
8 changes: 5 additions & 3 deletions trunk/fs/proc/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,8 @@ int proc_tgid_stat(struct seq_file *m, struct pid_namespace *ns,
return do_task_stat(m, ns, pid, task, 1);
}

int proc_pid_statm(struct task_struct *task, char *buffer)
int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
struct pid *pid, struct task_struct *task)
{
int size = 0, resident = 0, shared = 0, text = 0, lib = 0, data = 0;
struct mm_struct *mm = get_task_mm(task);
Expand All @@ -572,7 +573,8 @@ int proc_pid_statm(struct task_struct *task, char *buffer)
size = task_statm(mm, &shared, &text, &data, &resident);
mmput(mm);
}
seq_printf(m, "%d %d %d %d %d %d %d\n",
size, resident, shared, text, lib, data, 0);

return sprintf(buffer, "%d %d %d %d %d %d %d\n",
size, resident, shared, text, lib, data, 0);
return 0;
}
4 changes: 2 additions & 2 deletions trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2281,7 +2281,7 @@ static const struct pid_entry tgid_base_stuff[] = {
#endif
INF("cmdline", S_IRUGO, pid_cmdline),
ONE("stat", S_IRUGO, tgid_stat),
INF("statm", S_IRUGO, pid_statm),
ONE("statm", S_IRUGO, pid_statm),
REG("maps", S_IRUGO, maps),
#ifdef CONFIG_NUMA
REG("numa_maps", S_IRUGO, numa_maps),
Expand Down Expand Up @@ -2612,7 +2612,7 @@ static const struct pid_entry tid_base_stuff[] = {
#endif
INF("cmdline", S_IRUGO, pid_cmdline),
ONE("stat", S_IRUGO, tid_stat),
INF("statm", S_IRUGO, pid_statm),
ONE("statm", S_IRUGO, pid_statm),
REG("maps", S_IRUGO, maps),
#ifdef CONFIG_NUMA
REG("numa_maps", S_IRUGO, numa_maps),
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/proc/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ extern int proc_tid_stat(struct seq_file *m, struct pid_namespace *ns,
extern int proc_tgid_stat(struct seq_file *m, struct pid_namespace *ns,
struct pid *pid, struct task_struct *task);
extern int proc_pid_status(struct task_struct *, char *);
extern int proc_pid_statm(struct task_struct *, char *);
extern int proc_pid_statm(struct seq_file *m, struct pid_namespace *ns,
struct pid *pid, struct task_struct *task);
extern loff_t mem_lseek(struct file *file, loff_t offset, int orig);

extern const struct file_operations proc_maps_operations;
Expand Down

0 comments on commit fade416

Please sign in to comment.