[PATCH 3/9] erofs-utils: lib: get rid of z_erofs_fill_inode()
Gao Xiang
hsiangkao at linux.alibaba.com
Thu Feb 6 23:50:28 AEDT 2025
Source kernel commit: 4fdadd5b0f0c723c812842454f8cca1619f2e731
Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>
---
include/erofs/internal.h | 1 -
lib/namei.c | 2 --
lib/zmap.c | 17 -----------------
3 files changed, 20 deletions(-)
diff --git a/include/erofs/internal.h b/include/erofs/internal.h
index 7f01782..5f5bc10 100644
--- a/include/erofs/internal.h
+++ b/include/erofs/internal.h
@@ -455,7 +455,6 @@ int erofs_getxattr(struct erofs_inode *vi, const char *name, char *buffer,
int erofs_listxattr(struct erofs_inode *vi, char *buffer, size_t buffer_size);
/* zmap.c */
-int z_erofs_fill_inode(struct erofs_inode *vi);
int z_erofs_map_blocks_iter(struct erofs_inode *vi,
struct erofs_map_blocks *map, int flags);
diff --git a/lib/namei.c b/lib/namei.c
index 6f35ee6..eec1f5c 100644
--- a/lib/namei.c
+++ b/lib/namei.c
@@ -143,8 +143,6 @@ int erofs_read_inode_from_disk(struct erofs_inode *vi)
}
vi->u.chunkbits = sbi->blkszbits +
(vi->u.chunkformat & EROFS_CHUNK_FORMAT_BLKBITS_MASK);
- } else if (erofs_inode_is_data_compressed(vi->datalayout)) {
- return z_erofs_fill_inode(vi);
}
return 0;
bogusimode:
diff --git a/lib/zmap.c b/lib/zmap.c
index 74c0033..0a9bc6a 100644
--- a/lib/zmap.c
+++ b/lib/zmap.c
@@ -10,23 +10,6 @@
#include "erofs/internal.h"
#include "erofs/print.h"
-int z_erofs_fill_inode(struct erofs_inode *vi)
-{
- struct erofs_sb_info *sbi = vi->sbi;
-
- if (!erofs_sb_has_big_pcluster(sbi) &&
- !erofs_sb_has_ztailpacking(sbi) && !erofs_sb_has_fragments(sbi) &&
- vi->datalayout == EROFS_INODE_COMPRESSED_FULL) {
- vi->z_advise = 0;
- vi->z_algorithmtype[0] = 0;
- vi->z_algorithmtype[1] = 0;
- vi->z_logical_clusterbits = sbi->blkszbits;
-
- vi->flags |= EROFS_I_Z_INITED;
- }
- return 0;
-}
-
struct z_erofs_maprecorder {
struct erofs_inode *inode;
struct erofs_map_blocks *map;
--
2.43.5
More information about the Linux-erofs
mailing list