aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-04-12 20:32:25 -0400
committerBen Hutchings <ben@decadent.org.uk>2012-05-11 13:14:07 +0100
commit4cd37e4fc23fe6cc7aa933e75dc794c85d0f330a (patch)
treeff77e73d7976ccd31ee1218e6f2d76152ad50d24 /fs
parent52b7f704efa589dcef1cdbda8accad9d251c20e6 (diff)
ext4: fix endianness breakage in ext4_split_extent_at()
commit af1584f570b19b0285e4402a0b54731495d31784 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>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/extents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index c2a2012021a..54f2bdc3225 100644
--- a/fs/ext4/extents.c
+++ b/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;