diff options
Diffstat (limited to 'fs/fuse/dev_uring.c')
| -rw-r--r-- | fs/fuse/dev_uring.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c index eef7f7eac795..53bd5ae4b686 100644 --- a/fs/fuse/dev_uring.c +++ b/fs/fuse/dev_uring.c @@ -243,14 +243,14 @@ static struct fuse_ring *fuse_uring_create(struct fuse_conn *fc) max_payload_size = max(FUSE_MIN_READ_BUFFER, fc->max_write); max_payload_size = max(max_payload_size, fc->max_pages * PAGE_SIZE); - spin_lock(&fc->lock); + spin_lock(&fc->chan->lock); if (!fc->chan->connected) { - spin_unlock(&fc->lock); + spin_unlock(&fc->chan->lock); goto out_err; } if (fc->chan->ring) { /* race, another thread created the ring in the meantime */ - spin_unlock(&fc->lock); + spin_unlock(&fc->chan->lock); res = fc->chan->ring; goto out_err; } @@ -262,7 +262,7 @@ static struct fuse_ring *fuse_uring_create(struct fuse_conn *fc) ring->max_payload_sz = max_payload_size; smp_store_release(&fc->chan->ring, ring); - spin_unlock(&fc->lock); + spin_unlock(&fc->chan->lock); return ring; out_err: @@ -302,9 +302,9 @@ static struct fuse_ring_queue *fuse_uring_create_queue(struct fuse_ring *ring, queue->fpq.processing = pq; fuse_pqueue_init(&queue->fpq); - spin_lock(&fc->lock); + spin_lock(&fc->chan->lock); if (ring->queues[qid]) { - spin_unlock(&fc->lock); + spin_unlock(&fc->chan->lock); kfree(queue->fpq.processing); kfree(queue); return ring->queues[qid]; @@ -314,7 +314,7 @@ static struct fuse_ring_queue *fuse_uring_create_queue(struct fuse_ring *ring, * write_once and lock as the caller mostly doesn't take the lock at all */ WRITE_ONCE(ring->queues[qid], queue); - spin_unlock(&fc->lock); + spin_unlock(&fc->chan->lock); return queue; } @@ -1008,16 +1008,16 @@ static int fuse_uring_do_register(struct fuse_ring_ent *ent, struct fuse_conn *fc = ring->fc; struct fuse_iqueue *fiq = &fc->chan->iq; - spin_lock(&fc->lock); + spin_lock(&fc->chan->lock); /* abort teardown path is running or has run */ if (!fc->chan->connected) { - spin_unlock(&fc->lock); + spin_unlock(&fc->chan->lock); if (atomic_dec_and_test(&ring->queue_refs)) wake_up_all(&ring->stop_waitq); kfree(ent); return -ECONNABORTED; } - spin_unlock(&fc->lock); + spin_unlock(&fc->chan->lock); fuse_uring_prepare_cancel(cmd, issue_flags, ent); |
