summaryrefslogtreecommitdiffstats
path: root/fs/ext2/ext2fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext2/ext2fs.c')
-rw-r--r--fs/ext2/ext2fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext2/ext2fs.c b/fs/ext2/ext2fs.c
index c21d2d6172..9cf2fb7ba4 100644
--- a/fs/ext2/ext2fs.c
+++ b/fs/ext2/ext2fs.c
@@ -389,7 +389,7 @@ int ext2fs_read_file
int blockcnt;
int log2blocksize = LOG2_EXT2_BLOCK_SIZE (node->data);
int blocksize = 1 << (log2blocksize + DISK_SECTOR_BITS);
- unsigned int filesize = node->inode.size;
+ unsigned int filesize = __le32_to_cpu(node->inode.size);
/* Adjust len so it we can't read past the end of the file. */
if (len > filesize) {
OpenPOWER on IntegriCloud