]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fs: move mntput_no_expire() slowpath into a dedicated routine
authorMateusz Guzik <mjguzik@gmail.com>
Fri, 14 Nov 2025 20:18:03 +0000 (21:18 +0100)
committerChristian Brauner <brauner@kernel.org>
Wed, 19 Nov 2025 13:49:28 +0000 (14:49 +0100)
commitbfef6e1f3488fc09ae966cb4dd2cb09f73cff791
tree181507c192c4c620407eae58e637a27e94c901fd
parent6d228c181ed27957100bb1e77ccbb8078a22a8c1
fs: move mntput_no_expire() slowpath into a dedicated routine

In the stock variant the compiler spills several registers on the stack
and employs stack smashing protection, adding even more code + a branch
on exit..

The actual fast path is small enough that the compiler inlines it for
all callers -- the symbol is no longer emitted.

Forcing noinline on it just for code-measurement purposes shows the fast
path dropping from 111 to 39 bytes.

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