[PATCH v9 04/10] namei: split out nd->dfd handling to dirfd_path_init
Aleksa Sarai
cyphar at cyphar.com
Fri Jul 12 22:07:43 AEST 2019
On 2019-07-12, Al Viro <viro at zeniv.linux.org.uk> wrote:
> On Sun, Jul 07, 2019 at 12:57:31AM +1000, Aleksa Sarai wrote:
> > Previously, path_init's handling of *at(dfd, ...) was only done once,
> > but with LOOKUP_BENEATH (and LOOKUP_IN_ROOT) we have to parse the
> > initial nd->path at different times (before or after absolute path
> > handling) depending on whether we have been asked to scope resolution
> > within a root.
>
> > if (*s == '/') {
> > - set_root(nd);
> > - if (likely(!nd_jump_root(nd)))
> > - return s;
> > - return ERR_PTR(-ECHILD);
>
> > + if (likely(!nd->root.mnt))
> > + set_root(nd);
>
> How can we get there with non-NULL nd->root.mnt, when LOOKUP_ROOT case
> has been already handled by that point?
Yup, you're completely right. I will remove the
if (!nd->root.mnt)
in the next version.
--
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
<https://www.cyphar.com/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20190712/694217e5/attachment.sig>
More information about the Linuxppc-dev
mailing list