History

io_uring: move io_uring_get_socket() into io_uring.h

Now we have a io_uring kernel header, move this definition out of fs.h and into io_uring.h where it belongs.

Jens Axboe committed 6 years ago

Commit a3ec6001 parent 9b828493 files · +6 −9Browse files

Unified · Split

3 files
  1. include/linux/fs.h +0 −9
  2. include/linux/io_uring.h +5 −0
  3. net/unix/scm.c +1 −0
include/linux/fs.h+0−9
@@ -3514,15 +3514,6 @@ extern int vfs_fadvise(struct file *file, loff_t offset, loff_t len, · 3513 unmodified lines
35143514 extern int generic_fadvise(struct file *file, loff_t offset, loff_t len,
35153515 int advice);
35163516
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−
35263517 int vfs_ioc_setflags_prepare(struct inode *inode, unsigned int oldflags,
35273518 unsigned int flags);
35283519
include/linux/io_uring.h+5−0
@@ -19,6 +19,7 @@ struct io_uring_task { · 18 unmodified lines
1919 };
2020
2121 #if defined(CONFIG_IO_URING)
22+struct sock *io_uring_get_socket(struct file *file);
2223 void __io_uring_task_cancel(void);
2324 void __io_uring_files_cancel(struct files_struct *files);
2425 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
3940 __io_uring_free(tsk);
4041 }
4142 #else
43+static inline struct sock *io_uring_get_socket(struct file *file)
44+{
45+ return NULL;
46+}
4247 static inline void io_uring_task_cancel(void)
4348 {
4449 }
net/unix/scm.c+1−0
@@ -8,6 +8,7 @@ · 7 unmodified lines
88 #include <net/af_unix.h>
99 #include <net/scm.h>
1010 #include <linux/init.h>
11+#include <linux/io_uring.h>
1112
1213 #include "scm.h"
1314