summaryrefslogtreecommitdiff
path: root/fs/erofs/super.c
diff options
context:
space:
mode:
authorJingbo Xu <jefflexu@linux.alibaba.com>2023-04-07 22:17:06 +0800
committerGao Xiang <hsiangkao@linux.alibaba.com>2023-04-17 01:15:51 +0800
commita97a218b08868029507272a8fc6b52491a157ec5 (patch)
tree934b69b17e6612aab8036cf2da37932e8a7f79f2 /fs/erofs/super.c
parenteb2c5e41be1495cf7a20ff49df473b1c45b82e77 (diff)
erofs: move packed inode out of the compression part
packed inode could be used in more scenarios which are independent of compression in the future. For example, packed inode could be used to keep extra long xattr prefixes with the help of following patches. Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com> Reviewed-by: Yue Hu <huyue2@coolpad.com> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> Acked-by: Chao Yu <chao@kernel.org> Link: https://lore.kernel.org/r/20230407141710.113882-4-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/super.c')
-rw-r--r--fs/erofs/super.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index f45a15ee2311..2ab70e960e47 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -808,7 +808,6 @@ static int erofs_fc_fill_super(struct super_block *sb, struct fs_context *fc)
erofs_shrinker_register(sb);
/* sb->s_umount is already locked, SB_ACTIVE and SB_BORN are not set */
-#ifdef CONFIG_EROFS_FS_ZIP
if (erofs_sb_has_fragments(sbi) && sbi->packed_nid) {
sbi->packed_inode = erofs_iget(sb, sbi->packed_nid);
if (IS_ERR(sbi->packed_inode)) {
@@ -817,7 +816,6 @@ static int erofs_fc_fill_super(struct super_block *sb, struct fs_context *fc)
return err;
}
}
-#endif
err = erofs_init_managed_cache(sb);
if (err)
return err;
@@ -984,9 +982,9 @@ static void erofs_put_super(struct super_block *sb)
#ifdef CONFIG_EROFS_FS_ZIP
iput(sbi->managed_cache);
sbi->managed_cache = NULL;
+#endif
iput(sbi->packed_inode);
sbi->packed_inode = NULL;
-#endif
erofs_free_dev_context(sbi->devs);
sbi->devs = NULL;
erofs_fscache_unregister_fs(sb);