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>
This commit is contained in:
Jeffle Xu 2022-04-02 18:32:50 +08:00 committed by Miklos Szeredi
parent 2fdbb8dd01
commit 47e301491c

View File

@ -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;
}