Now we have a io_uring kernel header, move this definition out of fs.h and into io_uring.h where it belongs.
Unified · Split
| @@ -3514,15 +3514,6 @@ extern int vfs_fadvise(struct file *file, loff_t offset, loff_t len, · 3513 unmodified lines | |||
| 3514 | extern int generic_fadvise(struct file *file, loff_t offset, loff_t len, | 3514 | extern int generic_fadvise(struct file *file, loff_t offset, loff_t len, |
| 3515 | int advice); | 3515 | int advice); |
| 3516 | 3516 | ||
| 3517 | #if defined(CONFIG_IO_URING) | ||
| 3518 | extern struct sock *io_uring_get_socket(struct file *file); | ||
| 3519 | #else | ||
| 3520 | static inline struct sock *io_uring_get_socket(struct file *file) | ||
| 3521 | { | ||
| 3522 | return NULL; | ||
| 3523 | } | ||
| 3524 | #endif | ||
| 3525 | |||
| 3526 | int vfs_ioc_setflags_prepare(struct inode *inode, unsigned int oldflags, | 3517 | int vfs_ioc_setflags_prepare(struct inode *inode, unsigned int oldflags, |
| 3527 | unsigned int flags); | 3518 | unsigned int flags); |
| 3528 | 3519 | ||
| @@ -19,6 +19,7 @@ struct io_uring_task { · 18 unmodified lines | |||
| 19 | }; | 19 | }; |
| 20 | 20 | ||
| 21 | #if defined(CONFIG_IO_URING) | 21 | #if defined(CONFIG_IO_URING) |
| 22 | struct sock *io_uring_get_socket(struct file *file); | ||
| 22 | void __io_uring_task_cancel(void); | 23 | void __io_uring_task_cancel(void); |
| 23 | void __io_uring_files_cancel(struct files_struct *files); | 24 | void __io_uring_files_cancel(struct files_struct *files); |
| 24 | void __io_uring_free(struct task_struct *tsk); | 25 | void __io_uring_free(struct task_struct *tsk); |
| @@ -39,6 +40,10 @@ static inline void io_uring_free(struct task_struct *tsk) · 14 unmodified lines | |||
| 39 | __io_uring_free(tsk); | 40 | __io_uring_free(tsk); |
| 40 | } | 41 | } |
| 41 | #else | 42 | #else |
| 43 | static inline struct sock *io_uring_get_socket(struct file *file) | ||
| 44 | { | ||
| 45 | return NULL; | ||
| 46 | } | ||
| 42 | static inline void io_uring_task_cancel(void) | 47 | static inline void io_uring_task_cancel(void) |
| 43 | { | 48 | { |
| 44 | } | 49 | } |
| @@ -8,6 +8,7 @@ · 7 unmodified lines | |||
| 8 | #include <net/af_unix.h> | 8 | #include <net/af_unix.h> |
| 9 | #include <net/scm.h> | 9 | #include <net/scm.h> |
| 10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
| 11 | #include <linux/io_uring.h> | ||
| 11 | 12 | ||
| 12 | #include "scm.h" | 13 | #include "scm.h" |
| 13 | 14 | ||