This is a note to let you know that I've just added the patch titled erofs: relinquish volume with mutex held to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: erofs-relinquish-volume-with-mutex-held.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 81a102c00f3a054ac186f2fb55635c9179c9053d Author: Jingbo Xu <jefflexu@xxxxxxxxxxxxxxxxx> Date: Thu Feb 9 14:39:12 2023 +0800 erofs: relinquish volume with mutex held [ Upstream commit 7032809a44d752b9e2275833787e0aa88a7540af ] 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 <jefflexu@xxxxxxxxxxxxxxxxx> Reviewed-by: Jia Zhu <zhujia.zj@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20230209063913.46341-4-jefflexu@xxxxxxxxxxxxxxxxx Signed-off-by: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/fs/erofs/fscache.c b/fs/erofs/fscache.c index b04f93bc062a8..076cf8a149ef3 100644 --- a/fs/erofs/fscache.c +++ b/fs/erofs/fscache.c @@ -398,8 +398,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;