From: Al Viro <viro@zeniv.linux.org.uk>
To: Mateusz Guzik <mjguzik@gmail.com>
Cc: brauner@kernel.org, jack@suse.cz, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, clm@meta.com
Subject: Re: [PATCH v2] fs: make sure to fail try_to_unlazy() and try_to_unlazy() for LOOKUP_CACHED
Date: Wed, 17 Dec 2025 09:08:33 +0000 [thread overview]
Message-ID: <20251217090833.GS1712166@ZenIV> (raw)
In-Reply-To: <20251217084704.2323682-1-mjguzik@gmail.com>
On Wed, Dec 17, 2025 at 09:47:04AM +0100, Mateusz Guzik wrote:
> Otherwise the slowpath can be taken by the caller, defeating the flag.
>
> This regressed after calls to legitimize_links() started being
> conditionally elided and stems from the routine always failing
> after seeing the flag, regardless if there were any links.
>
> In order to address both the bug and the weird semantics make it illegal
> to call legitimize_links() with LOOKUP_CACHED and handle the problem at
> the two callsites.
>
> Pull up ->depth = 0 to drop_links() to avoid repeating it in the
> callers.
>
> One remaining weirdness is terminate_walk() walking the symlink stack
> after drop_links().
What weirdness? If we are not in RCU mode, we need to drop symlink bodies
*and* drop symlink references?
next prev parent reply other threads:[~2025-12-17 9:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 8:47 [PATCH v2] fs: make sure to fail try_to_unlazy() and try_to_unlazy() for LOOKUP_CACHED Mateusz Guzik
2025-12-17 9:08 ` Al Viro [this message]
2025-12-17 9:11 ` Mateusz Guzik
2025-12-17 10:06 ` Al Viro
2025-12-17 10:13 ` Mateusz Guzik
2025-12-17 10:27 ` Mateusz Guzik
2025-12-17 10:48 ` Al Viro
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=20251217090833.GS1712166@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=brauner@kernel.org \
--cc=clm@meta.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mjguzik@gmail.com \
/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