mm: make counting of list_lru_one::nr_items lockless
[linux-block.git] / include / linux / list_lru.h
index bb8129a3474d7ebe3977e0631809ea71342c8e55..96def9d15b1b04ddaef055c99729ea08af16f4e2 100644 (file)
@@ -32,6 +32,7 @@ struct list_lru_one {
 };
 
 struct list_lru_memcg {
+       struct rcu_head         rcu;
        /* array of per cgroup lists, indexed by memcg_cache_id */
        struct list_lru_one     *lru[0];
 };
@@ -43,7 +44,7 @@ struct list_lru_node {
        struct list_lru_one     lru;
 #if defined(CONFIG_MEMCG) && !defined(CONFIG_SLOB)
        /* for cgroup aware lrus points to per cgroup lists, otherwise NULL */
-       struct list_lru_memcg   *memcg_lrus;
+       struct list_lru_memcg   __rcu *memcg_lrus;
 #endif
        long nr_items;
 } ____cacheline_aligned_in_smp;