From: Dmitry Monakhov Date: Wed, 10 Apr 2013 03:56:44 +0000 (-0400) Subject: ext4: fix big-endian bug in extent migration code X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=0b65349ebc24b80cf9f6654a1c4f66c8c796e9f1;p=openwrt%2Fstaging%2Fblogic.git ext4: fix big-endian bug in extent migration code Signed-off-by: Dmitry Monakhov Signed-off-by: "Theodore Ts'o" Cc: stable@vger.kernel.org --- diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 8b158ae2443b..34ba222f32fa 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -4756,7 +4756,7 @@ int ext4_ind_migrate(struct inode *inode) eh = ext_inode_hdr(inode); ex = EXT_FIRST_EXTENT(eh); if (ext4_blocks_count(es) > EXT4_MAX_BLOCK_FILE_PHYS || - eh->eh_depth != 0 || eh->eh_entries > 1) { + eh->eh_depth != 0 || le16_to_cpu(eh->eh_entries) > 1) { ret = -EOPNOTSUPP; goto errout; }