[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230209063913.46341-4-jefflexu@linux.alibaba.com>
Date: Thu, 9 Feb 2023 14:39:12 +0800
From: Jingbo Xu <jefflexu@...ux.alibaba.com>
To: xiang@...nel.org, chao@...nel.org, linux-erofs@...ts.ozlabs.org,
zhujia.zj@...edance.com
Cc: huyue2@...lpad.com, linux-kernel@...r.kernel.org
Subject: [PATCH v3 3/4] 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@...ux.alibaba.com>
Reviewed-by: Jia Zhu <zhujia.zj@...edance.com>
---
fs/erofs/fscache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/erofs/fscache.c b/fs/erofs/fscache.c
index a302d6d23ab5..c6f09928b62c 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;
--
2.19.1.6.gb485710b
Powered by blists - more mailing lists