mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
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 <mszeredi@redhat.com>
This commit is contained in:
parent
3344b7367a
commit
d1f2721f8c
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user