public inbox for virtualization@lists.linux-foundation.org
 help / color / mirror / Atom feed
* [PATCH] virtio_fs: Remove redundant spinlock in virtio_fs_request_complete()
@ 2025-06-13  5:50 lirongqing
  2025-06-13 19:51 ` kernel test robot
  2025-06-15 13:28 ` Stefan Hajnoczi
  0 siblings, 2 replies; 3+ messages in thread
From: lirongqing @ 2025-06-13  5:50 UTC (permalink / raw)
  To: vgoyal, stefanha, miklos, eperezma, virtualization, linux-fsdevel,
	linux-kernel
  Cc: Li RongQing

From: Li RongQing <lirongqing@baidu.com>

Since clear_bit is an atomic operation, the spinlock is redundant and
can be removed, reducing lock contention is good for performance.

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 fs/fuse/virtio_fs.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 8f2e2f3..de34179 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -791,9 +791,7 @@ static void virtio_fs_request_complete(struct fuse_req *req,
 		}
 	}
 
-	spin_lock(&fpq->lock);
 	clear_bit(FR_SENT, &req->flags);
-	spin_unlock(&fpq->lock);
 
 	fuse_request_end(req);
 	spin_lock(&fsvq->lock);
-- 
2.9.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-15 13:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13  5:50 [PATCH] virtio_fs: Remove redundant spinlock in virtio_fs_request_complete() lirongqing
2025-06-13 19:51 ` kernel test robot
2025-06-15 13:28 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox