Commit a5abeeac authored by Johannes Weiner's avatar Johannes Weiner Committed by Linus Torvalds

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: default avatarJohannes Weiner <hannes@cmpxchg.org>
Reviewed-by: default avatarRik van Riel <riel@redhat.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 83d5cde4
...@@ -419,10 +419,22 @@ static inline swp_entry_t get_swap_page(void) ...@@ -419,10 +419,22 @@ static inline swp_entry_t get_swap_page(void)
} }
/* linux/mm/thrash.c */ /* linux/mm/thrash.c */
#define put_swap_token(mm) do { } while (0) static inline void put_swap_token(struct mm_struct *mm)
#define grab_swap_token(mm) do { } while (0) {
#define has_swap_token(mm) 0 }
#define disable_swap_token() do { } while (0)
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 static inline void
mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent)
......
Markdown is supported
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