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)
__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
* 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);
}
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)
#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
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;
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;
}