public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: MMP: Fix endianness bug.
@ 2012-02-23 19:09 santoshprasadnayak
  2012-02-23 21:49 ` Johann Lombardi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: santoshprasadnayak @ 2012-02-23 19:09 UTC (permalink / raw)
  To: tytso
  Cc: adilger, andrew_perepechko, nikitas_angelinas, johann,
	linux-kernel, kernel-janitors, Santosh Nayak

From: Santosh Nayak <santoshprasadnayak@gmail.com>

Sparse complaint this endian bug in ext4: mmp.

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
---
 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 7ea4ba4..ed6548d 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)
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-02-27  6:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-23 19:09 [PATCH] ext4: MMP: Fix endianness bug santoshprasadnayak
2012-02-23 21:49 ` Johann Lombardi
2012-02-24 17:10 ` Andreas Dilger
2012-02-27  6:11 ` Ted Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox