Commit 9de1581e authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds
Browse files

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: default avatarOleg Nesterov <>
Cc: Hugh Dickins <>
Reviewed-by: default avatarKOSAKI Motohiro <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent a12888f7
......@@ -391,8 +391,15 @@ extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long);
(mm)->hiwater_vm = (mm)->total_vm; \
} while (0)
#define get_mm_hiwater_rss(mm) max((mm)->hiwater_rss, get_mm_rss(mm))
#define get_mm_hiwater_vm(mm) max((mm)->hiwater_vm, (mm)->total_vm)
static inline unsigned long get_mm_hiwater_rss(struct mm_struct *mm)
return max(mm->hiwater_rss, get_mm_rss(mm));
static inline unsigned long get_mm_hiwater_vm(struct mm_struct *mm)
return max(mm->hiwater_vm, mm->total_vm);
extern void set_dumpable(struct mm_struct *mm, int value);
extern int get_dumpable(struct mm_struct *mm);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment