dump.f2fs: fix incorrect endian conversion

f2fs_inode.i_mode is variable of __le16 type, during endian converison,
it should to use le16_to_cpu instead of le32_to_cpu, fix it.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Chao Yu 2018-12-10 11:19:01 +08:00 committed by Jaegeuk Kim
parent cec37b066b
commit 1a5588cdfb

View File

@ -409,7 +409,7 @@ static void dump_file(struct f2fs_sb_info *sbi, struct node_info *ni,
struct f2fs_node *node_blk, int force)
{
struct f2fs_inode *inode = &node_blk->i;
u32 imode = le32_to_cpu(inode->i_mode);
u32 imode = le16_to_cpu(inode->i_mode);
u32 namelen = le32_to_cpu(inode->i_namelen);
char name[F2FS_NAME_LEN + 1] = {0};
char path[1024] = {0};