[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49155E45.3030704@cn.fujitsu.com>
Date: Sat, 08 Nov 2008 17:39:17 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: Balbir Singh <balbir@...ux.vnet.ibm.com>
CC: linux-mm@...ck.org, YAMAMOTO Takashi <yamamoto@...inux.co.jp>,
Paul Menage <menage@...gle.com>, linux-kernel@...r.kernel.org,
Nick Piggin <nickpiggin@...oo.com.au>,
David Rientjes <rientjes@...gle.com>,
Pavel Emelianov <xemul@...nvz.org>,
Dhaval Giani <dhaval@...ux.vnet.ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [RFC][mm] [PATCH 4/4] Memory cgroup hierarchy feature selector
(v2)
> +static int mem_cgroup_hierarchy_write(struct cgroup *cont, struct cftype *cft,
> + u64 val)
> +{
> + int retval = 0;
> + struct mem_cgroup *mem = mem_cgroup_from_cont(cont);
> +
> + if (val == 1) {
> + if (list_empty(&cont->children))
cgroup_lock should be held before checking cont->children.
> + mem->use_hierarchy = val;
> + else
> + retval = -EBUSY;
> + } else if (val == 0) {
And code duplicate.
> + if (list_empty(&cont->children))
> + mem->use_hierarchy = val;
> + else
> + retval = -EBUSY;
> + } else
> + retval = -EINVAL;
> +
> + return retval;
> +}
> +
--
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