git: 7d5531407e77 - stable/15 - linuxkpi: Define `fd_file()`
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 29 Apr 2026 21:42:56 UTC
The branch stable/15 has been updated by dumbbell:
URL: https://cgit.FreeBSD.org/src/commit/?id=7d5531407e77770e3ede37d03a82897881dfbc1c
commit 7d5531407e77770e3ede37d03a82897881dfbc1c
Author: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2026-04-11 15:18:06 +0000
Commit: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2026-04-29 21:03:43 +0000
linuxkpi: Define `fd_file()`
This macro simply returns the `file` field of the `struct fd`.
The DRM generic code and the amdgpu driver started to use it in
Linux 6.12.
Reviewed by: bz
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 373871696d3da5f9fe1dcd23c83be95dbaa1b41d)
---
sys/compat/linuxkpi/common/include/linux/file.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/file.h b/sys/compat/linuxkpi/common/include/linux/file.h
index be12d5f1bccf..4d8f8fba7fab 100644
--- a/sys/compat/linuxkpi/common/include/linux/file.h
+++ b/sys/compat/linuxkpi/common/include/linux/file.h
@@ -184,6 +184,8 @@ static inline struct fd fdget(unsigned int fd)
return (struct fd){f};
}
+#define fd_file(fd) ((fd).linux_file)
+
#define file linux_file
#define fget(...) linux_fget(__VA_ARGS__)