Skip to contentSkip to conversation

mkfs.f2fs: fix to handle endianness in f2fs_write_check_point_pack

PATCH New Chao Yu 1 participant 1 message Feb 8, 2018

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/1 mkfs.f2fs: fix to handle endianness in f2fs_write_check_point_pack

From: Chao Yu <[email protected]>

This patch fixes to handle missing endianness in f2fs_write_check_point_pack.

---
 mkfs/f2fs_format.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mkfs/f2fs_format.c +1 -1
index 93e9fea..4c3df96 100644
@@ -783,7 +783,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);
 	}
Signature · 6 lines
2.14.1.145.gb3622a4ee


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot