mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
mm: use is_migrate_highatomic() to simplify the code
Introduce two helpers, is_migrate_highatomic() and is_migrate_highatomic_page(). Simplify the code, no functional changes. [[email protected]: use static inlines rather than macros, per mhocko] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Xishi Qiu <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Vlastimil Babka <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Joonsoo Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
322b8afe4a
commit
a6ffdc0784
3 changed files with 17 additions and 9 deletions
|
|
@ -510,4 +510,14 @@ extern const struct trace_print_flags pageflag_names[];
|
|||
extern const struct trace_print_flags vmaflag_names[];
|
||||
extern const struct trace_print_flags gfpflag_names[];
|
||||
|
||||
static inline bool is_migrate_highatomic(enum migratetype migratetype)
|
||||
{
|
||||
return migratetype == MIGRATE_HIGHATOMIC;
|
||||
}
|
||||
|
||||
static inline bool is_migrate_highatomic_page(struct page *page)
|
||||
{
|
||||
return get_pageblock_migratetype(page) == MIGRATE_HIGHATOMIC;
|
||||
}
|
||||
|
||||
#endif /* __MM_INTERNAL_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue