Skip to content

Commit

Permalink
ext4: fix endianness breakage in ext4_split_extent_at()
Browse files Browse the repository at this point in the history
->ee_len is __le16, so assigning cpu_to_le32() to it is going to do
Bad Things(tm) on big-endian hosts...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Apr 13, 2012
1 parent efe3965 commit af1584f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -2882,7 +2882,7 @@ static int ext4_split_extent_at(handle_t *handle,
if (err)
goto fix_extent_len;
/* update the extent length and mark as initialized */
ex->ee_len = cpu_to_le32(ee_len);
ex->ee_len = cpu_to_le16(ee_len);
ext4_ext_try_to_merge(inode, path, ex);
err = ext4_ext_dirty(handle, inode, path + depth);
goto out;
Expand Down

0 comments on commit af1584f

Please sign in to comment.