From 95e93d17cb113a3b097774874572b69c058acab5 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Wed, 4 Oct 2023 13:19:15 +0200 Subject: [PATCH] vfs: predict the error in retry_estale as unlikely Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20231004111916.728135-2-mjguzik@gmail.com Signed-off-by: Christian Brauner --- include/linux/namei.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/namei.h b/include/linux/namei.h index e3619920f9f01..3100371b5e321 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h @@ -136,7 +136,7 @@ static inline void nd_terminate_link(void *name, size_t len, size_t maxlen) static inline bool retry_estale(const long error, const unsigned int flags) { - return error == -ESTALE && !(flags & LOOKUP_REVAL); + return unlikely(error == -ESTALE && !(flags & LOOKUP_REVAL)); } #endif /* _LINUX_NAMEI_H */ -- 2.30.2