Skip to content

Commit

Permalink
mm: make swap token dummies static inlines
Browse files Browse the repository at this point in the history
Make use of the compiler's typechecking on !CONFIG_SWAP as well.

[akpm@linux-foundation.org: build fix]
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Johannes Weiner authored and Linus Torvalds committed Sep 22, 2009
1 parent 83d5cde commit a5abeea
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions include/linux/swap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a5abeea

Please sign in to comment.