@@ -1071,12 +1071,14 @@ This describes how the VFS can manipulate an open file. As of kernel
10711071
10721072 struct file_operations {
10731073 struct module *owner;
1074+ fop_flags_t fop_flags;
10741075 loff_t (*llseek) (struct file *, loff_t, int);
10751076 ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
10761077 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
10771078 ssize_t (*read_iter) (struct kiocb *, struct iov_iter *);
10781079 ssize_t (*write_iter) (struct kiocb *, struct iov_iter *);
1079- int (*iopoll)(struct kiocb *kiocb, bool spin);
1080+ int (*iopoll)(struct kiocb *kiocb, struct io_comp_batch *,
1081+ unsigned int flags);
10801082 int (*iterate_shared) (struct file *, struct dir_context *);
10811083 __poll_t (*poll) (struct file *, struct poll_table_struct *);
10821084 long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
@@ -1093,18 +1095,24 @@ This describes how the VFS can manipulate an open file. As of kernel
10931095 int (*flock) (struct file *, int, struct file_lock *);
10941096 ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
10951097 ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
1096- int (*setlease)(struct file *, long, struct file_lock **, void **);
1098+ void (*splice_eof)(struct file *file);
1099+ int (*setlease)(struct file *, int, struct file_lease **, void **);
10971100 long (*fallocate)(struct file *file, int mode, loff_t offset,
10981101 loff_t len);
10991102 void (*show_fdinfo)(struct seq_file *m, struct file *f);
11001103 #ifndef CONFIG_MMU
11011104 unsigned (*mmap_capabilities)(struct file *);
11021105 #endif
1103- ssize_t (*copy_file_range)(struct file *, loff_t, struct file *, loff_t, size_t, unsigned int);
1106+ ssize_t (*copy_file_range)(struct file *, loff_t, struct file *,
1107+ loff_t, size_t, unsigned int);
11041108 loff_t (*remap_file_range)(struct file *file_in, loff_t pos_in,
11051109 struct file *file_out, loff_t pos_out,
11061110 loff_t len, unsigned int remap_flags);
11071111 int (*fadvise)(struct file *, loff_t, loff_t, int);
1112+ int (*uring_cmd)(struct io_uring_cmd *ioucmd, unsigned int issue_flags);
1113+ int (*uring_cmd_iopoll)(struct io_uring_cmd *, struct io_comp_batch *,
1114+ unsigned int poll_flags);
1115+ int (*mmap_prepare)(struct vm_area_desc *);
11081116 };
11091117
11101118 Again, all methods are called without any locks being held, unless
@@ -1144,7 +1152,8 @@ otherwise noted.
11441152 used on 64 bit kernels.
11451153
11461154``mmap ``
1147- called by the mmap(2) system call
1155+ called by the mmap(2) system call. Deprecated in favour of
1156+ ``mmap_prepare ``.
11481157
11491158``open ``
11501159 called by the VFS when an inode should be opened. When the VFS
@@ -1221,6 +1230,11 @@ otherwise noted.
12211230``fadvise ``
12221231 possibly called by the fadvise64() system call.
12231232
1233+ ``mmap_prepare ``
1234+ Called by the mmap(2) system call. Allows a VFS to set up a
1235+ file-backed memory mapping, most notably establishing relevant
1236+ private state and VMA callbacks.
1237+
12241238Note that the file operations are implemented by the specific
12251239filesystem in which the inode resides. When opening a device node
12261240(character or block special) most filesystems will call special
0 commit comments