From: Jeffle Xu Date: Sat, 2 Apr 2022 10:32:50 +0000 (+0800) Subject: fuse: avoid unnecessary spinlock bump X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=47e301491c4f52ca744c7660cf57492b902261f6;p=linux.git fuse: avoid unnecessary spinlock bump Move dmap free worker kicker inside the critical region, so that extra spinlock lock/unlock could be avoided. Suggested-by: Liu Jiang Signed-off-by: Jeffle Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Vivek Goyal Signed-off-by: Miklos Szeredi --- diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c index 10eb50cbf398c..e23e802a80130 100644 --- a/fs/fuse/dax.c +++ b/fs/fuse/dax.c @@ -138,9 +138,9 @@ static struct fuse_dax_mapping *alloc_dax_mapping(struct fuse_conn_dax *fcd) WARN_ON(fcd->nr_free_ranges <= 0); fcd->nr_free_ranges--; } + __kick_dmap_free_worker(fcd, 0); spin_unlock(&fcd->lock); - kick_dmap_free_worker(fcd, 0); return dmap; }