Skip to content

Commit 5f3e0b4

Browse files
mjguzikbrauner
authored andcommitted
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>
1 parent eaec2cd commit 5f3e0b4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/linux/file.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static inline struct fd CLONED_FD(struct file *f)
5959

6060
static inline void fdput(struct fd fd)
6161
{
62-
if (fd.word & FDPUT_FPUT)
62+
if (unlikely(fd.word & FDPUT_FPUT))
6363
fput(fd_file(fd));
6464
}
6565

0 commit comments

Comments
 (0)