diff options
Diffstat (limited to 'fs/proc/task_mmu.c')
-rw-r--r-- | fs/proc/task_mmu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 38338ed98cc6..a34c440f8d25 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -9,13 +9,14 @@ | |||
9 | #include <linux/mempolicy.h> | 9 | #include <linux/mempolicy.h> |
10 | #include <linux/swap.h> | 10 | #include <linux/swap.h> |
11 | #include <linux/swapops.h> | 11 | #include <linux/swapops.h> |
12 | #include <linux/seq_file.h> | ||
12 | 13 | ||
13 | #include <asm/elf.h> | 14 | #include <asm/elf.h> |
14 | #include <asm/uaccess.h> | 15 | #include <asm/uaccess.h> |
15 | #include <asm/tlbflush.h> | 16 | #include <asm/tlbflush.h> |
16 | #include "internal.h" | 17 | #include "internal.h" |
17 | 18 | ||
18 | char *task_mem(struct mm_struct *mm, char *buffer) | 19 | void task_mem(struct seq_file *m, struct mm_struct *mm) |
19 | { | 20 | { |
20 | unsigned long data, text, lib; | 21 | unsigned long data, text, lib; |
21 | unsigned long hiwater_vm, total_vm, hiwater_rss, total_rss; | 22 | unsigned long hiwater_vm, total_vm, hiwater_rss, total_rss; |
@@ -37,7 +38,7 @@ char *task_mem(struct mm_struct *mm, char *buffer) | |||
37 | data = mm->total_vm - mm->shared_vm - mm->stack_vm; | 38 | data = mm->total_vm - mm->shared_vm - mm->stack_vm; |
38 | text = (PAGE_ALIGN(mm->end_code) - (mm->start_code & PAGE_MASK)) >> 10; | 39 | text = (PAGE_ALIGN(mm->end_code) - (mm->start_code & PAGE_MASK)) >> 10; |
39 | lib = (mm->exec_vm << (PAGE_SHIFT-10)) - text; | 40 | lib = (mm->exec_vm << (PAGE_SHIFT-10)) - text; |
40 | buffer += sprintf(buffer, | 41 | seq_printf(m, |
41 | "VmPeak:\t%8lu kB\n" | 42 | "VmPeak:\t%8lu kB\n" |
42 | "VmSize:\t%8lu kB\n" | 43 | "VmSize:\t%8lu kB\n" |
43 | "VmLck:\t%8lu kB\n" | 44 | "VmLck:\t%8lu kB\n" |
@@ -56,7 +57,6 @@ char *task_mem(struct mm_struct *mm, char *buffer) | |||
56 | data << (PAGE_SHIFT-10), | 57 | data << (PAGE_SHIFT-10), |
57 | mm->stack_vm << (PAGE_SHIFT-10), text, lib, | 58 | mm->stack_vm << (PAGE_SHIFT-10), text, lib, |
58 | (PTRS_PER_PTE*sizeof(pte_t)*mm->nr_ptes) >> 10); | 59 | (PTRS_PER_PTE*sizeof(pte_t)*mm->nr_ptes) >> 10); |
59 | return buffer; | ||
60 | } | 60 | } |
61 | 61 | ||
62 | unsigned long task_vsize(struct mm_struct *mm) | 62 | unsigned long task_vsize(struct mm_struct *mm) |