--- zzzz-none-000/linux-3.10.107/fs/squashfs/dir.c 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/fs/squashfs/dir.c 2021-11-10 11:53:56.000000000 +0000 @@ -74,7 +74,7 @@ if (err < 0) break; - index = le32_to_cpu(dir_index.index); + index = squash_le32_to_cpu(dir_index.index); if (index > f_pos) /* * Found the index we're looking for. @@ -82,12 +82,12 @@ break; err = squashfs_read_metadata(sb, NULL, &index_start, - &index_offset, le32_to_cpu(dir_index.size) + 1); + &index_offset, squash_le32_to_cpu(dir_index.size) + 1); if (err < 0) break; length = index; - *next_block = le32_to_cpu(dir_index.start_block) + + *next_block = squash_le32_to_cpu(dir_index.start_block) + msblk->directory_table; } @@ -171,7 +171,7 @@ length += sizeof(dirh); - dir_count = le32_to_cpu(dirh.count) + 1; + dir_count = squash_le32_to_cpu(dirh.count) + 1; if (dir_count > SQUASHFS_DIR_COUNT) goto failed_read; @@ -185,7 +185,7 @@ if (err < 0) goto failed_read; - size = le16_to_cpu(dire->size) + 1; + size = squash_le16_to_cpu(dire->size) + 1; /* size should never be larger than SQUASHFS_NAME_LEN */ if (size > SQUASHFS_NAME_LEN) @@ -202,15 +202,15 @@ continue; dire->name[size] = '\0'; - inode_number = le32_to_cpu(dirh.inode_number) + - ((short) le16_to_cpu(dire->inode_number)); - type = le16_to_cpu(dire->type); + inode_number = squash_le32_to_cpu(dirh.inode_number) + + ((short) squash_le16_to_cpu(dire->inode_number)); + type = squash_le16_to_cpu(dire->type); TRACE("Calling filldir(%p, %s, %d, %lld, %x:%x, %d, %d)" "\n", dirent, dire->name, size, file->f_pos, - le32_to_cpu(dirh.start_block), - le16_to_cpu(dire->offset), + squash_le32_to_cpu(dirh.start_block), + squash_le16_to_cpu(dire->offset), inode_number, squashfs_filetype_table[type]);