From: Al Viro Date: Fri, 13 Apr 2012 00:32:25 +0000 (-0400) Subject: ext4: fix endianness breakage in ext4_split_extent_at() X-Git-Tag: accepted/tizen/common/20141203.182822~4818^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af1584f570b19b0285e4402a0b54731495d31784;p=platform%2Fkernel%2Flinux-arm64.git ext4: fix endianness breakage in ext4_split_extent_at() ->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 --- diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 1421938..1d41838 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -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;