summaryrefslogtreecommitdiff
path: root/fs/fuse/dax.c
diff options
context:
space:
mode:
authorJeffle Xu <jefflexu@linux.alibaba.com>2022-04-02 18:32:50 +0800
committerMiklos Szeredi <mszeredi@redhat.com>2022-07-21 16:02:45 +0200
commit47e301491c4f52ca744c7660cf57492b902261f6 (patch)
tree0c1a09487ed1591cb6d0fb1579179139f4ad4b8f /fs/fuse/dax.c
parent2fdbb8dd01556e1501132b5ad3826e8f71e24a8b (diff)
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 <gerry@linux.alibaba.com> Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/dax.c')
-rw-r--r--fs/fuse/dax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
index 10eb50cbf398..e23e802a8013 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;
}