Re: [PATCH v2 1/3] cgroup: fix mount failure in a corner case

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

 



Hello, Li.

On Fri, Jun 27, 2014 at 05:13:12PM +0800, Li Zefan wrote:
> +	for_each_subsys(ss, i) {
> +		if (!(opts.subsys_mask & (1 << i)) ||
> +		    ss->root == &cgrp_dfl_root)
> +			continue;
> +
> +		if (!percpu_ref_tryget_live(&ss->root->cgrp.self.refcnt)) {
> +			mutex_unlock(&cgroup_mutex);
> +			msleep(10);
> +			ret = restart_syscall();
> +			goto out_free;
> +		}

Why not just put it immediately?  We know that it's not gonna be
destroyed while holding cgroup_mutex.  It may look a bit weird but
this is a pretty special case anyway and deferring put doesn't buy
anything.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux