Re: [PATCH 1/2] cgroup: helper do determine group name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri 23-11-12 09:55:32, Michal Hocko wrote:
[...]
> Besides that rcu_read_{un}lock are not necessary if you keep the
> reference, right? The last dput happens only after the last css_put.

Stupid me. And of course rcu_dereference_check would tell me the truth
 
> > +const char *cgroup_name(const struct cgroup *cgrp)
> > +{
> > +	struct dentry *dentry;
> > +	rcu_read_lock();
> > +	dentry = rcu_dereference_check(cgrp->dentry, cgroup_lock_is_held());
> > +	rcu_read_unlock();
> > +	return dentry->d_name.name;
> > +}
> > +
-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]