From: Al Viro <viro@zeniv.linux.org.uk>
To: sunliming <sunliming@kylinos.cn>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
sunliming@kylino.cn, kelulanainsley@gmail.com
Subject: Re: [PATCH] walk_component(): get inode in lookup_slow branch statement block
Date: Wed, 22 Jun 2022 11:34:59 +0100 [thread overview]
Message-ID: <YrLwU27DNm0YWOvB@ZenIV> (raw)
In-Reply-To: <20220622085146.444516-1-sunliming@kylinos.cn>
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().
next prev parent reply other threads:[~2022-06-22 10:35 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 [this message]
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
-- strict thread matches above, loose matches on Subject: below --
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=YrLwU27DNm0YWOvB@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=kelulanainsley@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sunliming@kylino.cn \
--cc=sunliming@kylinos.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.