Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Apr 2026 21:42:51 +0000
Message-ID:  <69f27b5b.18d99.6d737b4d@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by dumbbell:

URL: https://cgit.FreeBSD.org/src/commit/?id=e51f77079a0d4edbea6f3dfd9e2eb599cc14a824

commit e51f77079a0d4edbea6f3dfd9e2eb599cc14a824
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2026-04-13 23:12:18 +0000
Commit:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2026-04-29 21:03:28 +0000

    linuxkpi: Add `fop_flags` to `struct file_operations`
    
    ... along with the `FOP_*` flag constants.
    
    Note that this `fop_flags` field is not used on FreeBSD. It is added to
    make the DRM drivers compile out of the box.
    
    The DRM generic code and drivers started this in Linux 6.12.
    
    Reviewed by:    bz
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit a5ae030d9f8f5557502c4e51d2a083a70c513379)
---
 sys/compat/linuxkpi/common/include/linux/fs.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/fs.h b/sys/compat/linuxkpi/common/include/linux/fs.h
index 7e28be070850..749a9fd22d3d 100644
--- a/sys/compat/linuxkpi/common/include/linux/fs.h
+++ b/sys/compat/linuxkpi/common/include/linux/fs.h
@@ -133,8 +133,11 @@ do {									\
 
 typedef int (*filldir_t)(void *, const char *, int, off_t, u64, unsigned);
 
+typedef unsigned int fop_flags_t;
+
 struct file_operations {
 	struct module *owner;
+	fop_flags_t fop_flags; /* Unused on FreeBSD. */
 	ssize_t (*read)(struct linux_file *, char __user *, size_t, off_t *);
 	ssize_t (*write)(struct linux_file *, const char __user *, size_t, off_t *);
 	unsigned int (*poll) (struct linux_file *, struct poll_table_struct *);
@@ -182,6 +185,14 @@ struct file_operations {
 	int (*setlease)(struct file *, long, struct file_lock **);
 #endif
 };
+
+#define	FOP_BUFFER_RASYNC	(1 << 0)
+#define	FOP_BUFFER_WASYNC	(1 << 1)
+#define	FOP_MMAP_SYNC		(1 << 2)
+#define	FOP_DIO_PARALLEL_WRITE	(1 << 3)
+#define	FOP_HUGE_PAGES		(1 << 4)
+#define	FOP_UNSIGNED_OFFSET	(1 << 5)
+
 #define	fops_get(fops)		(fops)
 #define	replace_fops(f, fops)	((f)->f_op = (fops))
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f27b5b.18d99.6d737b4d>