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 | 3514 | extern int generic_fadvise(struct file *file, loff_t offset, loff_t len, |
| 3515 | 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 | 3517 | int vfs_ioc_setflags_prepare(struct inode *inode, unsigned int oldflags, |
| 3527 | 3518 | unsigned int flags); |
| 3528 | 3519 | |
| @@ -19,6 +19,7 @@ struct io_uring_task { · 18 unmodified lines | ||
| 19 | 19 | }; |
| 20 | 20 | |
| 21 | 21 | #if defined(CONFIG_IO_URING) |
| 22 | +struct sock *io_uring_get_socket(struct file *file); | |
| 22 | 23 | void __io_uring_task_cancel(void); |
| 23 | 24 | void __io_uring_files_cancel(struct files_struct *files); |
| 24 | 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 | 40 | __io_uring_free(tsk); |
| 40 | 41 | } |
| 41 | 42 | #else |
| 43 | +static inline struct sock *io_uring_get_socket(struct file *file) | |
| 44 | +{ | |
| 45 | + return NULL; | |
| 46 | +} | |
| 42 | 47 | static inline void io_uring_task_cancel(void) |
| 43 | 48 | { |
| 44 | 49 | } |
| @@ -8,6 +8,7 @@ · 7 unmodified lines | ||
| 8 | 8 | #include <net/af_unix.h> |
| 9 | 9 | #include <net/scm.h> |
| 10 | 10 | #include <linux/init.h> |
| 11 | +#include <linux/io_uring.h> | |
| 11 | 12 | |
| 12 | 13 | #include "scm.h" |
| 13 | 14 | |