]> Gentwo Git Trees - linux/.git/commit
fs: tidy up step_into() & friends before inlining
authorMateusz Guzik <mjguzik@gmail.com>
Thu, 20 Nov 2025 00:38:02 +0000 (01:38 +0100)
committerChristian Brauner <brauner@kernel.org>
Wed, 26 Nov 2025 13:52:02 +0000 (14:52 +0100)
commit9d2a6211a7b972563d20edebccaae42994c429fb
treee414338abb41dcc3722f589091bb895a7de8d0da
parent1ed45a4ddc15cfb04a27303cfbd381d9e95a01da
fs: tidy up step_into() & friends before inlining

Symlink handling is already marked as unlikely and pushing out some of
it into pick_link() reduces register spillage on entry to step_into()
with gcc 14.2.

The compiler needed additional convincing that handle_mounts() is
unlikely to fail.

At the same time neither clang nor gcc could be convinced to tail-call
into pick_link().

While pick_link() takes an address of stack-based object as an argument
(which definitely prevents the optimization), splitting it into separate
<dentry, mount> tuple did not help. The issue persists even when
compiled without stack protector. As such nothing was done about this
for the time being to not grow the diff.

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://patch.msgid.link/20251120003803.2979978-1-mjguzik@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/namei.c