[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20140526174522.391b5f31@canb.auug.org.au>
Date: Mon, 26 May 2014 17:45:22 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Tejun Heo <tj@...nel.org>
Cc: linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Michal Hocko <mhocko@...e.cz>
Subject: linux-next: manual merge of the cgroup tree with Linus' tree
Hi Tejun,
Today's linux-next merge of the cgroup tree got a conflict in
mm/memcontrol.c between commit 6f6acb00514c ("memcg: fix swapcache
charge from kernel thread context") from Linus' tree and commit
ec903c0c858e ("cgroup: rename css_tryget*() to css_tryget_online*()")
from the cgroup tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
diff --cc mm/memcontrol.c
index 5177c6d4a2dd,b6f91d61b3af..000000000000
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@@ -1077,19 -1074,10 +1074,19 @@@ static struct mem_cgroup *get_mem_cgrou
rcu_read_lock();
do {
- memcg = mem_cgroup_from_task(rcu_dereference(mm->owner));
- if (unlikely(!memcg))
+ /*
+ * Page cache insertions can happen withou an
+ * actual mm context, e.g. during disk probing
+ * on boot, loopback IO, acct() writes etc.
+ */
+ if (unlikely(!mm))
memcg = root_mem_cgroup;
+ else {
+ memcg = mem_cgroup_from_task(rcu_dereference(mm->owner));
+ if (unlikely(!memcg))
+ memcg = root_mem_cgroup;
+ }
- } while (!css_tryget(&memcg->css));
+ } while (!css_tryget_online(&memcg->css));
rcu_read_unlock();
return memcg;
}
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists