From: Andrei Vagin <avagin@virtuozzo.com>
To: David Howells <dhowells@redhat.com>
Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org,
cgroups@vger.kernel.org, Tejun Heo <tj@kernel.org>
Subject: Re: [16/32] kernfs, sysfs, cgroup, intel_rdt: Support fs_context [ver #8]
Date: Fri, 22 Jun 2018 09:57:16 -0700 [thread overview]
Message-ID: <20180622165715.GA5361@outlook.office365.com> (raw)
In-Reply-To: <20180622153029.GA3070@outlook.office365.com>
On Fri, Jun 22, 2018 at 08:30:29AM -0700, Andrei Vagin wrote:
> On Fri, Jun 22, 2018 at 01:52:16PM +0100, David Howells wrote:
> > Andrei Vagin <avagin@virtuozzo.com> wrote:
> >
> > > ret = 0;
> > > + ctx->root = root;
> > > goto out_unlock;
> >
> > Okay, I can see that.
> >
> > > percpu_ref_reinit(&root->cgrp.self.refcnt);
> > > mutex_unlock(&cgroup_mutex);
> > > }
> > > + cgroup_get(&root->cgrp);
> >
> > This probably needs to be conditional on ret == 0.
>
> yes, you are right
I've read the code and I think it isn't obvious. A reference will be
released id cgroup_fs_context_free() even if ret isn't zero here.
I look at do_new_mount()
vfs_new_fs_context()
...
if (vfs_get_tree())
goto out_fc;
....
out_fc:
put_fs_context(fc);
fc->ops->free(fc);
cgroup_fs_context_free()
cgroup_put(&ctx->root->cgrp);
>
> >
> > Which version are you testing btw? The patches in git have been fixed a
> > little from what was last posted.
>
> I'm testing linux-next-20180621
>
> commit 8439c34f07a3f58245e933ca2703239417288363 (tag: next-20180621,
> linux-next/master)
> Author: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu Jun 21 14:09:41 2018 +1000
>
> Add linux-next specific files for 20180621
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>
> >
> > David
next prev parent reply other threads:[~2018-06-22 16:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <152720682792.9073.14747437198191460035.stgit@warthog.procyon.org.uk>
2018-06-21 18:47 ` [16/32] kernfs, sysfs, cgroup, intel_rdt: Support fs_context [ver #8] Andrei Vagin
2018-06-22 12:52 ` David Howells
2018-06-22 15:30 ` Andrei Vagin
2018-06-22 16:57 ` Andrei Vagin [this message]
2018-06-23 23:34 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180622165715.GA5361@outlook.office365.com \
--to=avagin@virtuozzo.com \
--cc=cgroups@vger.kernel.org \
--cc=dhowells@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox