[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A4DAE21.4000806@cn.fujitsu.com>
Date: Fri, 03 Jul 2009 15:07:13 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: Paul Menage <menage@...gle.com>
CC: balbir@...ux.vnet.ibm.com, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, containers@...ts.linux-foundation.org,
kamezawa.hiroyu@...fujitsu.com
Subject: Re: [PATCH 3/9] [RFC] Add a back-pointer from struct cg_cgroup_link
to struct cgroup
> +static int current_css_set_cg_links_read(struct cgroup *cont,
> + struct cftype *cft,
> + struct seq_file *seq)
> +{
> + struct cg_cgroup_link *link, *saved_link;
> + struct css_set *cg;
call for a newline
> + write_lock_irq(&css_set_lock);
can be read_lock(&css_set_lock);
> + task_lock(current);
> + cg = current->cgroups;
> + list_for_each_entry_safe(link, saved_link, &cg->cg_links,
> + cg_link_list) {
> + struct cgroup *c = link->cgrp;
> + const char *name;
call for a newline
> + rcu_read_lock();
> + if (c->dentry)
> + name = c->dentry->d_name.name;
> + else
> + name = "?";
> + seq_printf(seq, "Root %lu group %s\n",
> + c->root->subsys_bits, name);
> + rcu_read_unlock();
> + }
> + task_unlock(current);
> + write_unlock_irq(&css_set_lock);
> + return 0;
> +}
> +
--
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