io_uring: move io_uring_get_socket() into io_uring.h
authorJens Axboe <axboe@kernel.dk>
Sat, 19 Sep 2020 02:41:00 +0000 (20:41 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 1 Oct 2020 02:32:33 +0000 (20:32 -0600)
Now we have a io_uring kernel header, move this definition out of fs.h
and into io_uring.h where it belongs.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/fs.h
include/linux/io_uring.h
net/unix/scm.c

index 7519ae003a082cfd3d87d7628a91bd8f3b3a9fda..1c40684284619ee912f8c8dc307b50dd6844a399 100644 (file)
@@ -3514,15 +3514,6 @@ extern int vfs_fadvise(struct file *file, loff_t offset, loff_t len,
 extern int generic_fadvise(struct file *file, loff_t offset, loff_t len,
                           int advice);
 
-#if defined(CONFIG_IO_URING)
-extern struct sock *io_uring_get_socket(struct file *file);
-#else
-static inline struct sock *io_uring_get_socket(struct file *file)
-{
-       return NULL;
-}
-#endif
-
 int vfs_ioc_setflags_prepare(struct inode *inode, unsigned int oldflags,
                             unsigned int flags);
 
index c09135a1ef1323d30370ebef40182416e8e16c61..96315cfaf6d15881727a1ad49dfb3a70ad7e5129 100644 (file)
@@ -19,6 +19,7 @@ struct io_uring_task {
 };
 
 #if defined(CONFIG_IO_URING)
+struct sock *io_uring_get_socket(struct file *file);
 void __io_uring_task_cancel(void);
 void __io_uring_files_cancel(struct files_struct *files);
 void __io_uring_free(struct task_struct *tsk);
@@ -39,6 +40,10 @@ static inline void io_uring_free(struct task_struct *tsk)
                __io_uring_free(tsk);
 }
 #else
+static inline struct sock *io_uring_get_socket(struct file *file)
+{
+       return NULL;
+}
 static inline void io_uring_task_cancel(void)
 {
 }
index 8c40f2b323924d304111b7b8981e9bb209722d5b..052ae709ce2899e74ebb005d8886e42ccbf8b849 100644 (file)
@@ -8,6 +8,7 @@
 #include <net/af_unix.h>
 #include <net/scm.h>
 #include <linux/init.h>
+#include <linux/io_uring.h>
 
 #include "scm.h"