diff options
author | Oleg Nesterov <oleg@redhat.com> | 2009-03-31 18:19:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-01 11:59:11 -0400 |
commit | 9de1581e75ba9d7979766d4ab6d56f0f2d87f7c6 (patch) | |
tree | da6854544454f7f6184e6cd54c8b4e88bfc3543a /include | |
parent | a12888f772dab4bf5e6f73668dc4f5f6026a7014 (diff) |
get_mm_hiwater_xxx: trivial, s/define/inline/
Andrew pointed out get_mm_hiwater_xxx() evaluate "mm" argument thrice/twice,
make them inline.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Hugh Dickins <hugh@veritas.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sched.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 29df6374d2de..481fad3a9b42 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -391,8 +391,15 @@ extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); | |||
391 | (mm)->hiwater_vm = (mm)->total_vm; \ | 391 | (mm)->hiwater_vm = (mm)->total_vm; \ |
392 | } while (0) | 392 | } while (0) |
393 | 393 | ||
394 | #define get_mm_hiwater_rss(mm) max((mm)->hiwater_rss, get_mm_rss(mm)) | 394 | static inline unsigned long get_mm_hiwater_rss(struct mm_struct *mm) |
395 | #define get_mm_hiwater_vm(mm) max((mm)->hiwater_vm, (mm)->total_vm) | 395 | { |
396 | return max(mm->hiwater_rss, get_mm_rss(mm)); | ||
397 | } | ||
398 | |||
399 | static inline unsigned long get_mm_hiwater_vm(struct mm_struct *mm) | ||
400 | { | ||
401 | return max(mm->hiwater_vm, mm->total_vm); | ||
402 | } | ||
396 | 403 | ||
397 | extern void set_dumpable(struct mm_struct *mm, int value); | 404 | extern void set_dumpable(struct mm_struct *mm, int value); |
398 | extern int get_dumpable(struct mm_struct *mm); | 405 | extern int get_dumpable(struct mm_struct *mm); |