diff options
| author | Li RongQing <lirongqing@baidu.com> | 2025-06-15 21:20:39 +0800 |
|---|---|---|
| committer | Miklos Szeredi <mszeredi@redhat.com> | 2025-08-27 14:29:43 +0200 |
| commit | b4da63cea158f050865220a05ab691cfe8fb6450 (patch) | |
| tree | 6598009d3e2e88813cb2bd04907792a4e50aad46 | |
| parent | fuse: remove unneeded offset assignment when filling write pages (diff) | |
| download | linux-b4da63cea158f050865220a05ab691cfe8fb6450.tar.gz linux-b4da63cea158f050865220a05ab691cfe8fb6450.zip | |
virtio_fs: Remove redundant spinlock in virtio_fs_request_complete()
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>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
| -rw-r--r-- | fs/fuse/virtio_fs.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c index c826e7ca49f5..aeb488750fa6 100644 --- a/fs/fuse/virtio_fs.c +++ b/fs/fuse/virtio_fs.c @@ -761,7 +761,6 @@ static void copy_args_from_argbuf(struct fuse_args *args, struct fuse_req *req) static void virtio_fs_request_complete(struct fuse_req *req, struct virtio_fs_vq *fsvq) { - struct fuse_pqueue *fpq = &fsvq->fud->pq; struct fuse_args *args; struct fuse_args_pages *ap; unsigned int len, i, thislen; @@ -790,9 +789,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); |
