diff options
author | Santosh Nayak <santoshprasadnayak@gmail.com> | 2012-02-27 01:09:03 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-02-27 01:09:03 -0500 |
commit | 85d216501a7c2aa3e19d71c70430395c864a2ee5 (patch) | |
tree | 869861f592a16a7efd3f98a5df693adb71ae0319 /fs/ext4/mmp.c | |
parent | 9ee4930259abf3641ae85c19498eabe97cf6abad (diff) | |
download | linux-85d216501a7c2aa3e19d71c70430395c864a2ee5.tar.gz linux-85d216501a7c2aa3e19d71c70430395c864a2ee5.tar.bz2 linux-85d216501a7c2aa3e19d71c70430395c864a2ee5.zip |
ext4: Fix endianness bug when reading the MMP block
Sparse complained about this endian bug in fs/ext4/mmp.c.
Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/mmp.c')
-rw-r--r-- | fs/ext4/mmp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c index 7ea4ba4eff2a..ed6548d89165 100644 --- a/fs/ext4/mmp.c +++ b/fs/ext4/mmp.c @@ -257,8 +257,8 @@ int ext4_multi_mount_protect(struct super_block *sb, * If check_interval in MMP block is larger, use that instead of * update_interval from the superblock. */ - if (mmp->mmp_check_interval > mmp_check_interval) - mmp_check_interval = mmp->mmp_check_interval; + if (le16_to_cpu(mmp->mmp_check_interval) > mmp_check_interval) + mmp_check_interval = le16_to_cpu(mmp->mmp_check_interval); seq = le32_to_cpu(mmp->mmp_seq); if (seq == EXT4_MMP_SEQ_CLEAN) |