Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit d4219fa452e4ddd3fab591b547d0cb96b2a3a042 1 parent 9b5f073
Al Viro authored koenkooi committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  fs/ext4/extents.c
View
2  fs/ext4/extents.c
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.