summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjguzik@gmail.com>2025-04-07 01:58:05 +0200
committerChristian Brauner <brauner@kernel.org>2025-04-08 10:28:07 +0200
commit5f3e0b4a1f59ab616a09a45fddddefa6ef756229 (patch)
tree6720989d4ed92c53a41224a1ee09bcd50872baba
parenteaec2cd1670d5dde2b2b364699533cdb0452c99a (diff)
fs: predict not having to do anything in fdput()
This matches the annotation in fdget(). Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://lore.kernel.org/20250406235806.1637000-2-mjguzik@gmail.com Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r--include/linux/file.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/file.h b/include/linux/file.h
index 302f11355b10..af1768d934a0 100644
--- a/include/linux/file.h
+++ b/include/linux/file.h
@@ -59,7 +59,7 @@ static inline struct fd CLONED_FD(struct file *f)
static inline void fdput(struct fd fd)
{
- if (fd.word & FDPUT_FPUT)
+ if (unlikely(fd.word & FDPUT_FPUT))
fput(fd_file(fd));
}