Commit
a17e9f30 set up the extent header for a new file.
Unfortunately it didn't correctly handle byte swapping; fix this so
the regression tests pass on PowerPC systems.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Eric Sandeen <sandeen@redhat.com>
eh = (struct ext3_extent_header *) &inode.i_block[0];
eh->eh_depth = 0;
eh->eh_entries = 0;
- eh->eh_magic = EXT3_EXT_MAGIC;
+ eh->eh_magic = ext2fs_cpu_to_le16(EXT3_EXT_MAGIC);
i = (sizeof(inode.i_block) - sizeof(*eh)) /
sizeof(struct ext3_extent);
eh->eh_max = ext2fs_cpu_to_le16(i);