[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1245189037-22961-1-git-send-email-hannes@cmpxchg.org>
Date: Tue, 16 Jun 2009 23:50:36 +0200
From: Johannes Weiner <hannes@...xchg.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Hugh Dickins <hugh.dickins@...cali.co.uk>,
Andrea Arcangeli <aarcange@...hat.com>,
Izik Eidus <ieidus@...hat.com>, Rik van Riel <riel@...hat.com>,
Nick Piggin <nickpiggin@...oo.com.au>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: [patch 1/2] mm: make swap token dummies static inlines
Make use of the compiler's typechecking on !CONFIG_SWAP as well.
Signed-off-by: Johannes Weiner <hannes@...xchg.org>
---
include/linux/swap.h | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/include/linux/swap.h b/include/linux/swap.h
index d476aad..3c6e856 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -426,10 +426,22 @@ static inline swp_entry_t get_swap_page(void)
}
/* linux/mm/thrash.c */
-#define put_swap_token(x) do { } while(0)
-#define grab_swap_token() do { } while(0)
-#define has_swap_token(x) 0
-#define disable_swap_token() do { } while(0)
+static inline void put_swap_token(struct mm_struct *mm)
+{
+}
+
+static inline void grab_swap_token(void)
+{
+}
+
+static inline int has_swap_token(struct mm_struct *mm)
+{
+ return 0;
+}
+
+static inline void disable_swap_token(struct mm_struct *mm)
+{
+}
static inline int mem_cgroup_cache_charge_swapin(struct page *page,
struct mm_struct *mm, gfp_t mask, bool locked)
--
1.6.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists