diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /fs/proc/task_nommu.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'fs/proc/task_nommu.c')
-rw-r--r-- | fs/proc/task_nommu.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index 8f5c05d3dbd3..46d4b5d72bd3 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/fs_struct.h> | 5 | #include <linux/fs_struct.h> |
6 | #include <linux/mount.h> | 6 | #include <linux/mount.h> |
7 | #include <linux/ptrace.h> | 7 | #include <linux/ptrace.h> |
8 | #include <linux/slab.h> | ||
8 | #include <linux/seq_file.h> | 9 | #include <linux/seq_file.h> |
9 | #include "internal.h" | 10 | #include "internal.h" |
10 | 11 | ||
@@ -110,9 +111,13 @@ int task_statm(struct mm_struct *mm, int *shared, int *text, | |||
110 | } | 111 | } |
111 | } | 112 | } |
112 | 113 | ||
113 | size += (*text = mm->end_code - mm->start_code); | 114 | *text = (PAGE_ALIGN(mm->end_code) - (mm->start_code & PAGE_MASK)) |
114 | size += (*data = mm->start_stack - mm->start_data); | 115 | >> PAGE_SHIFT; |
116 | *data = (PAGE_ALIGN(mm->start_stack) - (mm->start_data & PAGE_MASK)) | ||
117 | >> PAGE_SHIFT; | ||
115 | up_read(&mm->mmap_sem); | 118 | up_read(&mm->mmap_sem); |
119 | size >>= PAGE_SHIFT; | ||
120 | size += *text + *data; | ||
116 | *resident = size; | 121 | *resident = size; |
117 | return size; | 122 | return size; |
118 | } | 123 | } |