From: Miklos Szeredi Date: Tue, 24 Mar 2026 12:07:07 +0000 (+0100) Subject: fuse: remove #include "fuse_i.h" from "dev_uring_i.h" X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d1f2721f8c9fc83ed8fb489402eb81ee96175770;p=thirdparty%2Fkernel%2Flinux.git fuse: remove #include "fuse_i.h" from "dev_uring_i.h" Start getting rid of fs layer stuff from transport layer files. Signed-off-by: Miklos Szeredi --- diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 96f0815b4df44..586d6fe46e317 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -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) diff --git a/fs/fuse/dev_uring_i.h b/fs/fuse/dev_uring_i.h index 8ba149e354235..c8649c4f30e6a 100644 --- a/fs/fuse/dev_uring_i.h +++ b/fs/fuse/dev_uring_i.h @@ -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; } diff --git a/fs/fuse/fuse_dev_i.h b/fs/fuse/fuse_dev_i.h index 846abb063c695..a0eb9cac9b2f4 100644 --- a/fs/fuse/fuse_dev_i.h +++ b/fs/fuse/fuse_dev_i.h @@ -8,6 +8,10 @@ #include #include +#include +#include +#include +#include /* Ordinary requests have even IDs, while interrupts IDs are odd */ #define FUSE_INT_REQ_BIT (1ULL << 0)