io_uring: include and forward-declaration sanitation
authorJens Axboe <axboe@kernel.dk>
Wed, 25 May 2022 17:48:35 +0000 (11:48 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jul 2022 00:39:12 +0000 (18:39 -0600)
Remove some dead headers we no longer need, and get rid of the
io_ring_ctx and io_uring_fops forward declarations.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c

index d7336e6..c122970 100644 (file)
 #include <linux/sizes.h>
 #include <linux/hugetlb.h>
 #include <linux/highmem.h>
-#include <linux/namei.h>
 #include <linux/fsnotify.h>
 #include <linux/fadvise.h>
 #include <linux/eventpoll.h>
-#include <linux/splice.h>
 #include <linux/task_work.h>
 #include <linux/pagemap.h>
 #include <linux/io_uring.h>
@@ -86,7 +84,6 @@
 
 #include <uapi/linux/io_uring.h>
 
-#include "../fs/internal.h"
 #include "io-wq.h"
 
 #include "io_uring_types.h"
 
 #define IO_TCTX_REFS_CACHE_NR  (1U << 10)
 
-struct io_ring_ctx;
-
 struct io_rsrc_put {
        struct list_head list;
        u64 tag;
@@ -352,8 +347,6 @@ static void io_eventfd_signal(struct io_ring_ctx *ctx);
 
 static struct kmem_cache *req_cachep;
 
-static const struct file_operations io_uring_fops;
-
 const char *io_uring_get_opcode(u8 opcode)
 {
        switch ((enum io_uring_op)opcode) {
@@ -457,11 +450,6 @@ const char *io_uring_get_opcode(u8 opcode)
        return "INVALID";
 }
 
-bool io_is_uring_fops(struct file *file)
-{
-       return file->f_op == &io_uring_fops;
-}
-
 struct sock *io_uring_get_socket(struct file *file)
 {
 #if defined(CONFIG_UNIX)
@@ -7402,6 +7390,11 @@ static const struct file_operations io_uring_fops = {
 #endif
 };
 
+bool io_is_uring_fops(struct file *file)
+{
+       return file->f_op == &io_uring_fops;
+}
+
 static __cold int io_allocate_scq_urings(struct io_ring_ctx *ctx,
                                         struct io_uring_params *p)
 {