ext4: fix big-endian bug in extent migration code
authorDmitry Monakhov <dmonakhov@openvz.org>
Wed, 10 Apr 2013 03:56:44 +0000 (23:56 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 10 Apr 2013 03:56:44 +0000 (23:56 -0400)
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
fs/ext4/extents.c

index 8b158ae2443bcd95509cc0b717d9f526e28aac87..34ba222f32fa1c8ea4622eb8b1331a8a86250c76 100644 (file)
@@ -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;
        }