linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tao Ma <tm@tao.ma>
To: linux-ext4@vger.kernel.org
Cc: "Theodore Ts'o" <tytso@mit.edu>
Subject: [PATCH] ext4: Use le32_to_cpu for ext4_extent_idx.ei_block in ext4_ext_search_left.
Date: Fri,  7 Oct 2011 23:30:28 +0800	[thread overview]
Message-ID: <1318001428-3108-3-git-send-email-tm@tao.ma> (raw)
In-Reply-To: <1318001428-3108-1-git-send-email-tm@tao.ma>

From: Tao Ma <boyu.mt@taobao.com>

ext4_extent_idx.e_block is __le32, so use le32_to_cpu when using them
in ext4_ext_search_left.

Cc: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
---
 fs/ext4/extents.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 37a1b4d..dee73d2 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -1235,9 +1235,9 @@ static int ext4_ext_search_left(struct inode *inode,
 			if (unlikely(ix != EXT_FIRST_INDEX(path[depth].p_hdr))) {
 				EXT4_ERROR_INODE(inode,
 				  "ix (%d) != EXT_FIRST_INDEX (%d) (depth %d)!",
-				  ix != NULL ? ix->ei_block : 0,
+				  ix != NULL ? le32_to_cpu(ix->ei_block) : 0,
 				  EXT_FIRST_INDEX(path[depth].p_hdr) != NULL ?
-				    EXT_FIRST_INDEX(path[depth].p_hdr)->ei_block : 0,
+				  le32_to_cpu(EXT_FIRST_INDEX(path[depth].p_hdr)->ei_block) : 0,
 				  depth);
 				return -EIO;
 			}
-- 
1.7.1


  parent reply	other threads:[~2011-10-07 15:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-07 15:30 [PATCH] ext4: Fix the wrong comment in ext4_ext_search_right Tao Ma
2011-10-07 15:30 ` [PATCH] ext4: Remove the obsolete broken EXT4_IOC32_WAIT_FOR_READONLY Tao Ma
2011-10-08 19:57   ` Ted Ts'o
2011-10-07 15:30 ` Tao Ma [this message]
2011-10-08 20:11   ` [PATCH] ext4: Use le32_to_cpu for ext4_extent_idx.ei_block in ext4_ext_search_left Ted Ts'o
2011-10-08 19:50 ` [PATCH] ext4: Fix the wrong comment in ext4_ext_search_right 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=1318001428-3108-3-git-send-email-tm@tao.ma \
    --to=tm@tao.ma \
    --cc=linux-ext4@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).