aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2009-09-21 20:01:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-22 10:17:25 -0400
commita5abeeacc44bbef2935a7a8e939264c28962def2 (patch)
treef4506e548c4a7991fcceef8edfd65e3a6911507f /include
parent83d5cde47dedf01b6a4a4331882cbc0a7eea3c2e (diff)
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 <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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/swap.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 7c15334f3ff2..6c990e658f4e 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -419,10 +419,22 @@ static inline swp_entry_t get_swap_page(void)
419} 419}
420 420
421/* linux/mm/thrash.c */ 421/* linux/mm/thrash.c */
422#define put_swap_token(mm) do { } while (0) 422static inline void put_swap_token(struct mm_struct *mm)
423#define grab_swap_token(mm) do { } while (0) 423{
424#define has_swap_token(mm) 0 424}
425#define disable_swap_token() do { } while (0) 425
426static inline void grab_swap_token(struct mm_struct *mm)
427{
428}
429
430static inline int has_swap_token(struct mm_struct *mm)
431{
432 return 0;
433}
434
435static inline void disable_swap_token(void)
436{
437}
426 438
427static inline void 439static inline void
428mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent) 440mem_cgroup_uncharge_swapcache(struct page *page, swp_entry_t ent)