All of lore.kernel.org
 help / color / mirror / Atom feed
From: santoshprasadnayak@gmail.com
To: tytso@mit.edu
Cc: adilger@dilger.ca, andrew_perepechko@xyratex.com,
	nikitas_angelinas@xyratex.com, johann@whamcloud.com,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Santosh Nayak <santoshprasadnayak@gmail.com>
Subject: [PATCH] ext4: MMP: Fix endianness bug.
Date: Thu, 23 Feb 2012 19:21:05 +0000	[thread overview]
Message-ID: <4f468ef2.4105440a.56cc.ffffa1d7@mx.google.com> (raw)

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


WARNING: multiple messages have this Message-ID (diff)
From: santoshprasadnayak@gmail.com
To: tytso@mit.edu
Cc: adilger@dilger.ca, andrew_perepechko@xyratex.com,
	nikitas_angelinas@xyratex.com, johann@whamcloud.com,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Santosh Nayak <santoshprasadnayak@gmail.com>
Subject: [PATCH] ext4: MMP: Fix endianness bug.
Date: Fri, 24 Feb 2012 00:39:05 +0530	[thread overview]
Message-ID: <4f468ef2.4105440a.56cc.ffffa1d7@mx.google.com> (raw)

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


             reply	other threads:[~2012-02-23 19:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23 19:09 santoshprasadnayak [this message]
2012-02-23 19:21 ` [PATCH] ext4: MMP: Fix endianness bug santoshprasadnayak
2012-02-23 21:49 ` Johann Lombardi
2012-02-23 21:49   ` Johann Lombardi
2012-02-24 17:10 ` Andreas Dilger
2012-02-24 17:10   ` Andreas Dilger
2012-02-27  6:11 ` Ted Ts'o
2012-02-27  6:11   ` Ted Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4f468ef2.4105440a.56cc.ffffa1d7@mx.google.com \
    --to=santoshprasadnayak@gmail.com \
    --cc=adilger@dilger.ca \
    --cc=andrew_perepechko@xyratex.com \
    --cc=johann@whamcloud.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nikitas_angelinas@xyratex.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.