Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Li RongQing and committed by
Miklos Szeredi
b4da63ce 6fd26f50

-3
-3
fs/fuse/virtio_fs.c
··· 761 761 static void virtio_fs_request_complete(struct fuse_req *req, 762 762 struct virtio_fs_vq *fsvq) 763 763 { 764 - struct fuse_pqueue *fpq = &fsvq->fud->pq; 765 764 struct fuse_args *args; 766 765 struct fuse_args_pages *ap; 767 766 unsigned int len, i, thislen; ··· 789 790 } 790 791 } 791 792 792 - spin_lock(&fpq->lock); 793 793 clear_bit(FR_SENT, &req->flags); 794 - spin_unlock(&fpq->lock); 795 794 796 795 fuse_request_end(req); 797 796 spin_lock(&fsvq->lock);