* [PATCH v1] fuse: remove unneeded atomic set in uring creation
@ 2025-03-18 0:41 Joanne Koong
2025-03-18 10:34 ` Bernd Schubert
0 siblings, 1 reply; 2+ messages in thread
From: Joanne Koong @ 2025-03-18 0:41 UTC (permalink / raw)
To: miklos, linux-fsdevel; +Cc: bernd.schubert, kernel-team
When the ring is allocated, it is kzalloc-ed. ring->queue_refs will
already be initialized to 0 by default. It does not need to be
atomically set to 0.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
---
fs/fuse/dev_uring.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c
index ab8c26042aa8..f54d150330a9 100644
--- a/fs/fuse/dev_uring.c
+++ b/fs/fuse/dev_uring.c
@@ -239,7 +239,6 @@ static struct fuse_ring *fuse_uring_create(struct fuse_conn *fc)
ring->nr_queues = nr_queues;
ring->fc = fc;
ring->max_payload_sz = max_payload_size;
- atomic_set(&ring->queue_refs, 0);
spin_unlock(&fc->lock);
return ring;
--
2.47.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] fuse: remove unneeded atomic set in uring creation
2025-03-18 0:41 [PATCH v1] fuse: remove unneeded atomic set in uring creation Joanne Koong
@ 2025-03-18 10:34 ` Bernd Schubert
0 siblings, 0 replies; 2+ messages in thread
From: Bernd Schubert @ 2025-03-18 10:34 UTC (permalink / raw)
To: Joanne Koong, miklos, linux-fsdevel; +Cc: kernel-team
On 3/18/25 01:41, Joanne Koong wrote:
> When the ring is allocated, it is kzalloc-ed. ring->queue_refs will
> already be initialized to 0 by default. It does not need to be
> atomically set to 0.
>
> Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
> ---
> fs/fuse/dev_uring.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/fuse/dev_uring.c b/fs/fuse/dev_uring.c
> index ab8c26042aa8..f54d150330a9 100644
> --- a/fs/fuse/dev_uring.c
> +++ b/fs/fuse/dev_uring.c
> @@ -239,7 +239,6 @@ static struct fuse_ring *fuse_uring_create(struct fuse_conn *fc)
> ring->nr_queues = nr_queues;
> ring->fc = fc;
> ring->max_payload_sz = max_payload_size;
> - atomic_set(&ring->queue_refs, 0);
>
> spin_unlock(&fc->lock);
> return ring;
Thank you, LGTM. I don't remember why I had added that explicit
initialization.
Reviewed-by: Bernd Schubert <bschubert@ddn.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-03-18 10:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-18 0:41 [PATCH v1] fuse: remove unneeded atomic set in uring creation Joanne Koong
2025-03-18 10:34 ` Bernd Schubert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox