mkfs.f2fs: fix to handle endianness in f2fs_write_check_point_pack
authorChao Yu <yuchao0@huawei.com>
Thu, 8 Feb 2018 15:17:11 +0000 (23:17 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 7 May 2018 21:49:38 +0000 (14:49 -0700)
This patch fixes to handle missing endianness in f2fs_write_check_point_pack.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
mkfs/f2fs_format.c

index b1102eb..ac5c98f 100644 (file)
@@ -784,7 +784,7 @@ static int f2fs_write_check_point_pack(void)
 
                for (j = 0; j < QUOTA_DATA(qtype); j++) {
                        (sum_entry + off + j)->nid = sb->qf_ino[qtype];
-                       (sum_entry + off + j)->ofs_in_node = j;
+                       (sum_entry + off + j)->ofs_in_node = cpu_to_le16(j);
                }
                off += QUOTA_DATA(qtype);
        }