[Top] [All Lists]

[PATCH 1/2] xfs: fix endian warning in xlog_recover_get_buf_lsn()

To: xfs@xxxxxxxxxxx
Subject: [PATCH 1/2] xfs: fix endian warning in xlog_recover_get_buf_lsn()
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 2 Sep 2013 13:22:58 +1000
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1378092179-24973-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1378092179-24973-1-git-send-email-david@xxxxxxxxxxxxx>
From: Dave Chinner <dchinner@xxxxxxxxxx>

sparse reports:

fs/xfs/xfs_log_recover.c:2017:24: sparse: cast to restricted __be64

Because I used the wrong structure for the on-disk superblock cast
in 50d5c8d ("xfs: check LSN ordering for v5 superblocks during
recovery"). Fix it.

Reported-by: kbuild test robot
Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
 fs/xfs/xfs_log_recover.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 8984ec4..1c3b0c9 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -2014,7 +2014,7 @@ xlog_recover_get_buf_lsn(
        case XFS_ATTR3_RMT_MAGIC:
                return be64_to_cpu(((struct xfs_attr3_rmt_hdr *)blk)->rm_lsn);
        case XFS_SB_MAGIC:
-               return be64_to_cpu(((struct xfs_sb *)blk)->sb_lsn);
+               return be64_to_cpu(((struct xfs_dsb *)blk)->sb_lsn);

<Prev in Thread] Current Thread [Next in Thread>