]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fs: touch up predicts in path lookup
authorMateusz Guzik <mjguzik@gmail.com>
Wed, 5 Nov 2025 15:06:30 +0000 (16:06 +0100)
committerChristian Brauner <brauner@kernel.org>
Thu, 13 Nov 2025 13:22:25 +0000 (14:22 +0100)
commit030e86dfdaa789dd2e2e481d7118979a9d1f8f4e
treeea2983b96df03a4df59e728aceb281a69ac58a0f
parent9eda581bfe8a1774390dd66f365a2e00a9d27a41
fs: touch up predicts in path lookup

Rationale:
- ND_ROOT_PRESET is only set in a condition already marked unlikely
- LOOKUP_IS_SCOPED already has unlikely on it, but inconsistently
  applied
- set_root() only fails if there is a bug
- most names are not empty (see !*s)
- most of the time path_init() does not encounter LOOKUP_CACHED without
  LOOKUP_RCU
- LOOKUP_IN_ROOT is a rarely seen flag

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