From: sunliming <kelulanainsley@gmail.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
sunliming@kylino.cn
Subject: Re: [PATCH] walk_component(): get inode in lookup_slow branch statement block
Date: Thu, 23 Jun 2022 17:57:56 +0800 [thread overview]
Message-ID: <CAJncD7SiqoXEKhT8D8OivNz96M4h=0NTs+jZtKF00gnFnrVxsw@mail.gmail.com> (raw)
In-Reply-To: <YrPinPcHHNfv3E3B@ZenIV>
Al Viro <viro@zeniv.linux.org.uk> 于2022年6月23日周四 11:48写道:
>
> On Thu, Jun 23, 2022 at 11:44:29AM +0800, sunliming wrote:
> > Al Viro <viro@zeniv.linux.org.uk> 于2022年6月22日周三 18:35写道:
> > >
> > > On Wed, Jun 22, 2022 at 04:51:46PM +0800, sunliming wrote:
> > > > The inode variable is used as a parameter by the step_into function,
> > > > but is not assigned a value in the sub-lookup_slow branch path. So
> > > > get the inode in the sub-lookup_slow branch path.
> > >
> > > Take a good look at handle_mounts() and the things it does when
> > > *not* in RCU mode (i.e. LOOKUP_RCU is not set). Specifically,
> > > *inode = d_backing_inode(path->dentry);
> > > *seqp = 0; /* out of RCU mode, so the value doesn't matter */
> > > this part.
> > >
> > > IOW, the values passed to step_into() in inode/seq are overridden unless
> > > we stay in RCU mode. And if we'd been through lookup_slow(), we'd been
> > > out of RCU mode since before we called step_into().
> >
> > It might be more appropriate and easier to understand to do this
> > before parameter passing in the top-level walk_component function?
>
> It's possible to fall out of RCU mode *inside* step_into(), so we need
> it done there anyway. Unfortunately ;-/
Thanks for your explanation
next prev parent reply other threads:[~2022-06-23 9:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 8:51 [PATCH] walk_component(): get inode in lookup_slow branch statement block sunliming
2022-06-22 10:34 ` Al Viro
2022-06-23 3:26 ` sunliming
2022-06-23 3:44 ` sunliming
2022-06-23 3:48 ` Al Viro
2022-06-23 9:57 ` sunliming [this message]
2022-06-22 8:53 sunliming
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='CAJncD7SiqoXEKhT8D8OivNz96M4h=0NTs+jZtKF00gnFnrVxsw@mail.gmail.com' \
--to=kelulanainsley@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sunliming@kylino.cn \
--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;
as well as URLs for NNTP newsgroup(s).