|
|
@@ -37,11 +37,7 @@ static int lru_shrinker_id(struct list_lru *lru)
|
|
|
|
|
|
static inline bool list_lru_memcg_aware(struct list_lru *lru)
|
|
|
{
|
|
|
- /*
|
|
|
- * This needs node 0 to be always present, even
|
|
|
- * in the systems supporting sparse numa ids.
|
|
|
- */
|
|
|
- return !!lru->node[0].memcg_lrus;
|
|
|
+ return lru->memcg_aware;
|
|
|
}
|
|
|
|
|
|
static inline struct list_lru_one *
|
|
|
@@ -451,6 +447,8 @@ static int memcg_init_list_lru(struct list_lru *lru, bool memcg_aware)
|
|
|
{
|
|
|
int i;
|
|
|
|
|
|
+ lru->memcg_aware = memcg_aware;
|
|
|
+
|
|
|
if (!memcg_aware)
|
|
|
return 0;
|
|
|
|