[PATCH] mm/vmscan: make global_reclaim() inline

From: larmbr
Date: Thu Aug 22 2013 - 01:40:16 EST


Though Gcc is likely to inline them, we should better
explictly do it manually, and also, this serve to document
this fact.

Signed-off-by: Zhan Jianyu <nasa4836@xxxxxxxxx>
---
mm/vmscan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 1de652d..1946d7d 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -135,12 +135,12 @@ static LIST_HEAD(shrinker_list);
static DECLARE_RWSEM(shrinker_rwsem);

#ifdef CONFIG_MEMCG
-static bool global_reclaim(struct scan_control *sc)
+static inline bool global_reclaim(struct scan_control *sc)
{
return !sc->target_mem_cgroup;
}
#else
-static bool global_reclaim(struct scan_control *sc)
+static inline bool global_reclaim(struct scan_control *sc)
{
return true;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/