From: Johannes Weiner Date: Tue, 22 Sep 2009 00:01:13 +0000 (-0700) Subject: mm: make swap token dummies static inlines X-Git-Tag: 2.1b_release~11370 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a5abeeacc44bbef2935a7a8e939264c28962def2;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git mm: make swap token dummies static inlines Make use of the compiler's typechecking on !CONFIG_SWAP as well. [akpm@linux-foundation.org: build fix] Signed-off-by: Johannes Weiner Reviewed-by: Rik van Riel Cc: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/swap.h b/include/linux/swap.h index 7c15334..6c990e6 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -419,10 +419,22 @@ static inline swp_entry_t get_swap_page(void) } /* linux/mm/thrash.c */ -#define put_swap_token(mm) do { } while (0) -#define grab_swap_token(mm) do { } while (0) -#define has_swap_token(mm) 0 -#define disable_swap_token() do { } while (0) +static inline void put_swap_token(struct mm_struct *mm) +{ +} + +static inline void grab_swap_token(struct mm_struct *mm) +{ +} + +static inline int has_swap_token(struct mm_struct *mm) +{ + return 0; +} + +static inline void disable_swap_token(void) +{ +} static inline void mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent)