]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
fuse: remove #include "fuse_i.h" from "dev_uring_i.h"
authorMiklos Szeredi <mszeredi@redhat.com>
Tue, 24 Mar 2026 12:07:07 +0000 (13:07 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 15 Jun 2026 12:06:16 +0000 (14:06 +0200)
Start getting rid of fs layer stuff from transport layer files.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dev.c
fs/fuse/dev_uring_i.h
fs/fuse/fuse_dev_i.h

index 96f0815b4df44646262bb0ecb715e9961ff0563d..586d6fe46e317c9fa3fc30ef4f2871bc5a16fc16 100644 (file)
@@ -83,7 +83,7 @@ void fuse_chan_set_initialized(struct fuse_chan *fch)
 static bool fuse_block_alloc(struct fuse_conn *fc, bool for_background)
 {
        return !fc->chan->initialized || (for_background && fc->chan->blocked) ||
-              (fc->chan->io_uring && fc->chan->connected && !fuse_uring_ready(fc));
+              (fc->chan->io_uring && fc->chan->connected && !fuse_uring_ready(fc->chan));
 }
 
 static void fuse_drop_waiting(struct fuse_conn *fc)
@@ -884,7 +884,7 @@ static int fuse_request_queue_background(struct fuse_req *req)
        __set_bit(FR_ISREPLY, &req->flags);
 
 #ifdef CONFIG_FUSE_IO_URING
-       if (fuse_uring_ready(fc))
+       if (fuse_uring_ready(fc->chan))
                return fuse_request_queue_background_uring(fc, req);
 #endif
 
@@ -2673,7 +2673,7 @@ void fuse_abort_conn(struct fuse_conn *fc)
                 * fc->chan->lock must not be taken to avoid conflicts with io-uring
                 * locks
                 */
-               fuse_uring_abort(fc);
+               fuse_uring_abort(fc->chan);
        } else {
                spin_unlock(&fc->chan->lock);
        }
@@ -2686,7 +2686,7 @@ void fuse_wait_aborted(struct fuse_conn *fc)
        smp_mb();
        wait_event(fc->chan->blocked_waitq, fuse_chan_num_waiting(fc->chan) == 0);
 
-       fuse_uring_wait_stopped_queues(fc);
+       fuse_uring_wait_stopped_queues(fc->chan);
 }
 
 int fuse_dev_release(struct inode *inode, struct file *file)
index 8ba149e35423567d29a3d40f16972f5c5b042518..c8649c4f30e6ab5de178b291a0189128cca06310 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef _FS_FUSE_DEV_URING_I_H
 #define _FS_FUSE_DEV_URING_I_H
 
-#include "fuse_i.h"
 #include "fuse_dev_i.h"
 
 #ifdef CONFIG_FUSE_IO_URING
@@ -144,9 +143,9 @@ bool fuse_uring_queue_bq_req(struct fuse_req *req);
 bool fuse_uring_remove_pending_req(struct fuse_req *req);
 bool fuse_uring_request_expired(struct fuse_chan *fch);
 
-static inline void fuse_uring_abort(struct fuse_conn *fc)
+static inline void fuse_uring_abort(struct fuse_chan *fch)
 {
-       struct fuse_ring *ring = fc->chan->ring;
+       struct fuse_ring *ring = fch->ring;
 
        if (ring == NULL)
                return;
@@ -157,33 +156,33 @@ static inline void fuse_uring_abort(struct fuse_conn *fc)
                fuse_uring_stop_queues(ring);
 }
 
-static inline void fuse_uring_wait_stopped_queues(struct fuse_conn *fc)
+static inline void fuse_uring_wait_stopped_queues(struct fuse_chan *fch)
 {
-       struct fuse_ring *ring = fc->chan->ring;
+       struct fuse_ring *ring = fch->ring;
 
        if (ring)
                wait_event(ring->stop_waitq,
                           atomic_read(&ring->queue_refs) == 0);
 }
 
-static inline bool fuse_uring_ready(struct fuse_conn *fc)
+static inline bool fuse_uring_ready(struct fuse_chan *fch)
 {
-       struct fuse_ring *ring = READ_ONCE(fc->chan->ring);
+       struct fuse_ring *ring = READ_ONCE(fch->ring);
 
        return ring && smp_load_acquire(&ring->ready);
 }
 
 #else /* CONFIG_FUSE_IO_URING */
 
-static inline void fuse_uring_abort(struct fuse_conn *fc)
+static inline void fuse_uring_abort(struct fuse_chan *fch)
 {
 }
 
-static inline void fuse_uring_wait_stopped_queues(struct fuse_conn *fc)
+static inline void fuse_uring_wait_stopped_queues(struct fuse_chan *fch)
 {
 }
 
-static inline bool fuse_uring_ready(struct fuse_conn *fc)
+static inline bool fuse_uring_ready(struct fuse_chan *fch)
 {
        return false;
 }
index 846abb063c6950c1775fd6bed327471528d23989..a0eb9cac9b2f4a9db88407ecb5fe67b8c12bdc55 100644 (file)
@@ -8,6 +8,10 @@
 
 #include <linux/fuse.h>
 #include <linux/types.h>
+#include <linux/refcount.h>
+#include <linux/wait.h>
+#include <linux/workqueue.h>
+#include <linux/fs.h>
 
 /* Ordinary requests have even IDs, while interrupts IDs are odd */
 #define FUSE_INT_REQ_BIT (1ULL << 0)