aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffle Xu <[email protected]>2022-04-02 18:32:50 +0800
committerMiklos Szeredi <[email protected]>2022-07-21 16:02:45 +0200
commit47e301491c4f52ca744c7660cf57492b902261f6 (patch)
tree0c1a09487ed1591cb6d0fb1579179139f4ad4b8f
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 <[email protected]> Signed-off-by: Jeffle Xu <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Reviewed-by: Vivek Goyal <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]>
-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;
}