summary refs log tree commit diff
path: root/fs/erofs/internal.h
diff options
context:
space:
mode:
authorJeffle Xu <jefflexu@linux.alibaba.com>2022-04-25 20:21:37 +0800
committerGao Xiang <hsiangkao@linux.alibaba.com>2022-05-18 00:11:20 +0800
commit37c90c5fae701983e21cc80396649e3aca7f4fa1 (patch)
treed34330aa7ec2b4086f1e4f5a87fa44c7321e9b9c /fs/erofs/internal.h
parentec00b5e29ce3a2493616a03b56593690574a8c86 (diff)
downloadlinux-37c90c5fae701983e21cc80396649e3aca7f4fa1.tar.gz
erofs: register fscache context for primary data blob
Registers fscache context for primary data blob. Also move the
initialization of s_op and related fields forward, since anonymous
inode will be allocated under the super block when registering the
fscache context.

Something worth mentioning about the cleanup routine.

1. The fscache context will instantiate anonymous inodes under the super
block. Release these anonymous inodes when .put_super() is called, or
we'll get "VFS: Busy inodes after unmount." warning.

2. The fscache context is initialized prior to the root inode. If
.kill_sb() is called when mount failed, .put_super() won't be called
when root inode has not been initialized yet. Thus .kill_sb() shall
also contain the cleanup routine.

Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220425122143.56815-16-jefflexu@linux.alibaba.com
Acked-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/internal.h')
-rw-r--r--fs/erofs/internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h
index 6ac5f68911e9..1a5eb6193932 100644
--- a/fs/erofs/internal.h
+++ b/fs/erofs/internal.h
@@ -155,6 +155,7 @@ struct erofs_sb_info {
 
 	/* fscache support */
 	struct fscache_volume *volume;
+	struct erofs_fscache *s_fscache;
 };
 
 #define EROFS_SB(sb) ((struct erofs_sb_info *)(sb)->s_fs_info)