提交 9de1581e 编写于 作者: O Oleg Nesterov 提交者: Linus Torvalds

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: NOleg Nesterov <oleg@redhat.com>
Cc: Hugh Dickins <hugh@veritas.com>
Reviewed-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a12888f7
...@@ -391,8 +391,15 @@ extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); ...@@ -391,8 +391,15 @@ extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long);
(mm)->hiwater_vm = (mm)->total_vm; \ (mm)->hiwater_vm = (mm)->total_vm; \
} while (0) } while (0)
#define get_mm_hiwater_rss(mm) max((mm)->hiwater_rss, get_mm_rss(mm)) static inline unsigned long get_mm_hiwater_rss(struct mm_struct *mm)
#define get_mm_hiwater_vm(mm) max((mm)->hiwater_vm, (mm)->total_vm) {
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 void set_dumpable(struct mm_struct *mm, int value);
extern int get_dumpable(struct mm_struct *mm); extern int get_dumpable(struct mm_struct *mm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册