summaryrefslogtreecommitdiffstats
path: root/fs/erofs/erofs_fs.h
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@redhat.com>2021-03-29 08:36:14 +0800
committerGao Xiang <hsiangkao@redhat.com>2021-03-29 10:20:45 +0800
commit24a806d849c0b0c1d0cd6a6b93ba4ae4c0ec9f08 (patch)
tree9cae419066736369e8d0ca46508166c323bb4016 /fs/erofs/erofs_fs.h
parent8137824eddd2e790c61c70c20d70a087faca95fa (diff)
downloadlinux-24a806d849c0b0c1d0cd6a6b93ba4ae4c0ec9f08.tar.bz2
erofs: add unsupported inode i_format check
If any unknown i_format fields are set (may be of some new incompat inode features), mark such inode as unsupported. Just in case of any new incompat i_format fields added in the future. Link: https://lore.kernel.org/r/20210329003614.6583-1-hsiangkao@aol.com Fixes: 431339ba9042 ("staging: erofs: add inode operations") Cc: <stable@vger.kernel.org> # 4.19+ Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Diffstat (limited to 'fs/erofs/erofs_fs.h')
-rw-r--r--fs/erofs/erofs_fs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/erofs/erofs_fs.h b/fs/erofs/erofs_fs.h
index 9ad1615f4474..e8d04d808fa6 100644
--- a/fs/erofs/erofs_fs.h
+++ b/fs/erofs/erofs_fs.h
@@ -75,6 +75,9 @@ static inline bool erofs_inode_is_data_compressed(unsigned int datamode)
#define EROFS_I_VERSION_BIT 0
#define EROFS_I_DATALAYOUT_BIT 1
+#define EROFS_I_ALL \
+ ((1 << (EROFS_I_DATALAYOUT_BIT + EROFS_I_DATALAYOUT_BITS)) - 1)
+
/* 32-byte reduced form of an ondisk inode */
struct erofs_inode_compact {
__le16 i_format; /* inode format hints */