From: Jingbo Xu Date: Thu, 9 Feb 2023 06:39:12 +0000 (+0800) Subject: erofs: relinquish volume with mutex held X-Git-Tag: v6.6.17~5563^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7032809a44d752b9e2275833787e0aa88a7540af;p=platform%2Fkernel%2Flinux-rpi.git erofs: relinquish volume with mutex held Relinquish fscache volume with mutex held. Otherwise if a new domain is registered when the old domain with the same name gets removed from the list but not relinquished yet, fscache may complain the collision. Fixes: 8b7adf1dff3d ("erofs: introduce fscache-based domain") Signed-off-by: Jingbo Xu Reviewed-by: Jia Zhu Link: https://lore.kernel.org/r/20230209063913.46341-4-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang --- diff --git a/fs/erofs/fscache.c b/fs/erofs/fscache.c index 0ee08e5..9383afe 100644 --- a/fs/erofs/fscache.c +++ b/fs/erofs/fscache.c @@ -326,8 +326,8 @@ static void erofs_fscache_domain_put(struct erofs_domain *domain) kern_unmount(erofs_pseudo_mnt); erofs_pseudo_mnt = NULL; } - mutex_unlock(&erofs_domain_list_lock); fscache_relinquish_volume(domain->volume, NULL, false); + mutex_unlock(&erofs_domain_list_lock); kfree(domain->domain_id); kfree(domain); return;