diff options
-rw-r--r-- | fs/exec.c | 2 | ||||
-rw-r--r-- | include/linux/mm.h | 4 | ||||
-rw-r--r-- | kernel/exit.c | 2 | ||||
-rw-r--r-- | mm/memory.c | 18 | ||||
-rw-r--r-- | mm/mmu_context.c | 2 |
5 files changed, 14 insertions, 14 deletions
@@ -824,7 +824,7 @@ static int exec_mmap(struct mm_struct *mm) | |||
824 | /* Notify parent that we're no longer interested in the old VM */ | 824 | /* Notify parent that we're no longer interested in the old VM */ |
825 | tsk = current; | 825 | tsk = current; |
826 | old_mm = current->mm; | 826 | old_mm = current->mm; |
827 | sync_mm_rss(tsk, old_mm); | 827 | sync_mm_rss(old_mm); |
828 | mm_release(tsk, old_mm); | 828 | mm_release(tsk, old_mm); |
829 | 829 | ||
830 | if (old_mm) { | 830 | if (old_mm) { |
diff --git a/include/linux/mm.h b/include/linux/mm.h index df17ff23d50e..ce2b2a3b2876 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1131,9 +1131,9 @@ static inline void setmax_mm_hiwater_rss(unsigned long *maxrss, | |||
1131 | } | 1131 | } |
1132 | 1132 | ||
1133 | #if defined(SPLIT_RSS_COUNTING) | 1133 | #if defined(SPLIT_RSS_COUNTING) |
1134 | void sync_mm_rss(struct task_struct *task, struct mm_struct *mm); | 1134 | void sync_mm_rss(struct mm_struct *mm); |
1135 | #else | 1135 | #else |
1136 | static inline void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) | 1136 | static inline void sync_mm_rss(struct mm_struct *mm) |
1137 | { | 1137 | { |
1138 | } | 1138 | } |
1139 | #endif | 1139 | #endif |
diff --git a/kernel/exit.c b/kernel/exit.c index 0ed15fed579f..d26acd3c1e2e 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -934,7 +934,7 @@ void do_exit(long code) | |||
934 | acct_update_integrals(tsk); | 934 | acct_update_integrals(tsk); |
935 | /* sync mm's RSS info before statistics gathering */ | 935 | /* sync mm's RSS info before statistics gathering */ |
936 | if (tsk->mm) | 936 | if (tsk->mm) |
937 | sync_mm_rss(tsk, tsk->mm); | 937 | sync_mm_rss(tsk->mm); |
938 | group_dead = atomic_dec_and_test(&tsk->signal->live); | 938 | group_dead = atomic_dec_and_test(&tsk->signal->live); |
939 | if (group_dead) { | 939 | if (group_dead) { |
940 | hrtimer_cancel(&tsk->signal->real_timer); | 940 | hrtimer_cancel(&tsk->signal->real_timer); |
diff --git a/mm/memory.c b/mm/memory.c index a5de734e14a7..2d27239ce4dd 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -125,17 +125,17 @@ core_initcall(init_zero_pfn); | |||
125 | 125 | ||
126 | #if defined(SPLIT_RSS_COUNTING) | 126 | #if defined(SPLIT_RSS_COUNTING) |
127 | 127 | ||
128 | static void __sync_task_rss_stat(struct task_struct *task, struct mm_struct *mm) | 128 | static void __sync_task_rss_stat(struct mm_struct *mm) |
129 | { | 129 | { |
130 | int i; | 130 | int i; |
131 | 131 | ||
132 | for (i = 0; i < NR_MM_COUNTERS; i++) { | 132 | for (i = 0; i < NR_MM_COUNTERS; i++) { |
133 | if (task->rss_stat.count[i]) { | 133 | if (current->rss_stat.count[i]) { |
134 | add_mm_counter(mm, i, task->rss_stat.count[i]); | 134 | add_mm_counter(mm, i, current->rss_stat.count[i]); |
135 | task->rss_stat.count[i] = 0; | 135 | current->rss_stat.count[i] = 0; |
136 | } | 136 | } |
137 | } | 137 | } |
138 | task->rss_stat.events = 0; | 138 | current->rss_stat.events = 0; |
139 | } | 139 | } |
140 | 140 | ||
141 | static void add_mm_counter_fast(struct mm_struct *mm, int member, int val) | 141 | static void add_mm_counter_fast(struct mm_struct *mm, int member, int val) |
@@ -157,12 +157,12 @@ static void check_sync_rss_stat(struct task_struct *task) | |||
157 | if (unlikely(task != current)) | 157 | if (unlikely(task != current)) |
158 | return; | 158 | return; |
159 | if (unlikely(task->rss_stat.events++ > TASK_RSS_EVENTS_THRESH)) | 159 | if (unlikely(task->rss_stat.events++ > TASK_RSS_EVENTS_THRESH)) |
160 | __sync_task_rss_stat(task, task->mm); | 160 | __sync_task_rss_stat(task->mm); |
161 | } | 161 | } |
162 | 162 | ||
163 | void sync_mm_rss(struct task_struct *task, struct mm_struct *mm) | 163 | void sync_mm_rss(struct mm_struct *mm) |
164 | { | 164 | { |
165 | __sync_task_rss_stat(task, mm); | 165 | __sync_task_rss_stat(mm); |
166 | } | 166 | } |
167 | #else /* SPLIT_RSS_COUNTING */ | 167 | #else /* SPLIT_RSS_COUNTING */ |
168 | 168 | ||
@@ -643,7 +643,7 @@ static inline void add_mm_rss_vec(struct mm_struct *mm, int *rss) | |||
643 | int i; | 643 | int i; |
644 | 644 | ||
645 | if (current->mm == mm) | 645 | if (current->mm == mm) |
646 | sync_mm_rss(current, mm); | 646 | sync_mm_rss(mm); |
647 | for (i = 0; i < NR_MM_COUNTERS; i++) | 647 | for (i = 0; i < NR_MM_COUNTERS; i++) |
648 | if (rss[i]) | 648 | if (rss[i]) |
649 | add_mm_counter(mm, i, rss[i]); | 649 | add_mm_counter(mm, i, rss[i]); |
diff --git a/mm/mmu_context.c b/mm/mmu_context.c index cf332bc0080a..3dcfaf4ed355 100644 --- a/mm/mmu_context.c +++ b/mm/mmu_context.c | |||
@@ -53,7 +53,7 @@ void unuse_mm(struct mm_struct *mm) | |||
53 | struct task_struct *tsk = current; | 53 | struct task_struct *tsk = current; |
54 | 54 | ||
55 | task_lock(tsk); | 55 | task_lock(tsk); |
56 | sync_mm_rss(tsk, mm); | 56 | sync_mm_rss(mm); |
57 | tsk->mm = NULL; | 57 | tsk->mm = NULL; |
58 | /* active_mm is still 'mm' */ | 58 | /* active_mm is still 'mm' */ |
59 | enter_lazy_tlb(mm, tsk); | 59 | enter_lazy_tlb(mm, tsk); |