aboutsummaryrefslogtreecommitdiffstats
path: root/fs/erofs/decompressor.c
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@redhat.com>2021-03-29 09:23:05 +0800
committerGao Xiang <hsiangkao@redhat.com>2021-03-29 10:24:57 +0800
commitde06a6a375414be03ce5b1054f2d836591923a1d (patch)
tree8db8685441b4a9a5d712c5679839de2388844077 /fs/erofs/decompressor.c
parenterofs: add unsupported inode i_format check (diff)
downloadlinux-dev-de06a6a375414be03ce5b1054f2d836591923a1d.tar.xz
linux-dev-de06a6a375414be03ce5b1054f2d836591923a1d.zip
erofs: introduce erofs_sb_has_xxx() helpers
Introduce erofs_sb_has_xxx() to make long checks short, especially for later big pcluster & LZMA features. Link: https://lore.kernel.org/r/20210329012308.28743-2-hsiangkao@aol.com Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Diffstat (limited to 'fs/erofs/decompressor.c')
-rw-r--r--fs/erofs/decompressor.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/erofs/decompressor.c b/fs/erofs/decompressor.c
index 34e73ff76f89..80e8871aef71 100644
--- a/fs/erofs/decompressor.c
+++ b/fs/erofs/decompressor.c
@@ -124,8 +124,7 @@ static int z_erofs_lz4_decompress(struct z_erofs_decompress_req *rq, u8 *out)
support_0padding = false;
/* decompression inplace is only safe when 0padding is enabled */
- if (EROFS_SB(rq->sb)->feature_incompat &
- EROFS_FEATURE_INCOMPAT_LZ4_0PADDING) {
+ if (erofs_sb_has_lz4_0padding(EROFS_SB(rq->sb))) {
support_0padding = true;
while (!src[inputmargin & ~PAGE_MASK])