Permalink
Browse files

ext4: fix endianness breakage in ext4_split_extent_at()

commit af1584f upstream.

->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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
  • Loading branch information...
1 parent 9b5f073 commit d4219fa452e4ddd3fab591b547d0cb96b2a3a042 Al Viro committed with koenkooi Apr 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 fs/ext4/extents.c
View
@@ -2812,7 +2812,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;

0 comments on commit d4219fa

Please sign in to comment.