From: Jia Zhu Date: Sun, 18 Sep 2022 04:34:51 +0000 (+0800) Subject: erofs: use kill_anon_super() to kill super in fscache mode X-Git-Tag: v5.19.17~531 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f27bafeb9fb455a686c47389e96193d7b2931de9;p=thirdparty%2Fkernel%2Fstable.git erofs: use kill_anon_super() to kill super in fscache mode [ Upstream commit 1015c1016c231b26d4e2c9b3da65b6c043eb97a3 ] Use kill_anon_super() instead of generic_shutdown_super() since the mount() in erofs fscache mode uses get_tree_nodev() and associated anon bdev needs to be freed. Fixes: 9c0cc9c729657 ("erofs: add 'fsid' mount option") Suggested-by: Jingbo Xu Signed-off-by: Jia Zhu Reviewed-by: Jingbo Xu Link: https://lore.kernel.org/r/20220918043456.147-2-zhujia.zj@bytedance.com Signed-off-by: Gao Xiang Signed-off-by: Sasha Levin --- diff --git a/fs/erofs/super.c b/fs/erofs/super.c index 95addc5c9d34d..ddf8f737cfb58 100644 --- a/fs/erofs/super.c +++ b/fs/erofs/super.c @@ -877,7 +877,7 @@ static void erofs_kill_sb(struct super_block *sb) WARN_ON(sb->s_magic != EROFS_SUPER_MAGIC); if (erofs_is_fscache_mode(sb)) - generic_shutdown_super(sb); + kill_anon_super(sb); else kill_block_super(sb);