1
0

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>
This commit is contained in:
Mateusz Guzik
2025-04-07 01:58:05 +02:00
committed by Christian Brauner
parent eaec2cd167
commit 5f3e0b4a1f

View File

@@ -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));
}