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 <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent eaec2cd commit 5f3e0b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)