ANDROID: Incremental fs: fix magic compatibility again
It's still magic number issue which cannot be compatible with
arm-32 platform, although we try to fix it in Iae4f3877444
("ANDROID: Incremental fs: magic number compatible 32-bit"),
there is still incompatible scenario, such as: get_incfs_node(),
it will return NULL then kernel exception will be trigger because
of NULL pointer access. (inode_set() -> get_incfs_node(), then used
node->xxx directly)
We change magic number directly, otherwise, we must fix above issues
one by one.
Bug: 159772865
Fixes: Iae4f3877444("ANDROID: Incremental fs: magic number compatible 32-bit")
Signed-off-by: Peng Zhou <Peng.Zhou@mediatek.com>
Signed-off-by: mtk81325 <peng.zhou@mediatek.com>
Change-Id: I71f279c1bb55ea296ab33a47644f30df4a9f60a6
Signed-off-by: Paul Lawrence <paullawrence@google.com>
This commit is contained in:
@@ -2180,7 +2180,7 @@ struct dentry *incfs_mount_fs(struct file_system_type *type, int flags,
|
||||
sb->s_op = &incfs_super_ops;
|
||||
sb->s_d_op = &incfs_dentry_ops;
|
||||
sb->s_flags |= S_NOATIME;
|
||||
sb->s_magic = (long)INCFS_MAGIC_NUMBER;
|
||||
sb->s_magic = INCFS_MAGIC_NUMBER;
|
||||
sb->s_time_gran = 1;
|
||||
sb->s_blocksize = INCFS_DATA_FILE_BLOCK_SIZE;
|
||||
sb->s_blocksize_bits = blksize_bits(sb->s_blocksize);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/* ===== constants ===== */
|
||||
#define INCFS_NAME "incremental-fs"
|
||||
#define INCFS_MAGIC_NUMBER (0x5346434e49ul)
|
||||
#define INCFS_MAGIC_NUMBER (unsigned long)(0x5346434e49ul)
|
||||
#define INCFS_DATA_FILE_BLOCK_SIZE 4096
|
||||
#define INCFS_HEADER_VER 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user