diff options
author | Jingbo Xu <jefflexu@linux.alibaba.com> | 2023-02-09 09:39:12 +0300 |
---|---|---|
committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2023-02-15 03:11:27 +0300 |
commit | 7032809a44d752b9e2275833787e0aa88a7540af (patch) | |
tree | eebf55ab84c629a2f256764c277cd0b4e500246a /fs/erofs/fscache.c | |
parent | 2dfb8c3b122fad4504a92c34ba68f2fe4444b3f6 (diff) | |
download | linux-7032809a44d752b9e2275833787e0aa88a7540af.tar.xz |
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 <jefflexu@linux.alibaba.com>
Reviewed-by: Jia Zhu <zhujia.zj@bytedance.com>
Link: https://lore.kernel.org/r/20230209063913.46341-4-jefflexu@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/fscache.c')
-rw-r--r-- | fs/erofs/fscache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/erofs/fscache.c b/fs/erofs/fscache.c index 0ee08e51c4a6..9383afe09bd0 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; |