Skip to content

Commit

Permalink
ext4: Fix endianness bug when reading the MMP block
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Santosh Nayak authored and Theodore Ts'o committed Feb 27, 2012
1 parent 9ee4930 commit 85d2165
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ext4/mmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 85d2165

Please sign in to comment.