md: use correct type in super_1_sync
authorChristoph Hellwig <hch@lst.de>
Thu, 4 Apr 2019 16:56:13 +0000 (18:56 +0200)
committerSong Liu <songliubraving@fb.com>
Wed, 10 Apr 2019 22:26:09 +0000 (15:26 -0700)
If we want to convert from a little endian format we need to cast
to a little endian type, otherwise sparse will be unhappy.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Song Liu <songliubraving@fb.com>
drivers/md/md.c

index 7a74e2de40b5f71ac4fc091cd3105fcd21d80b7d..4a31380b0eff942bc6cf7609328f7c64bc602a18 100644 (file)
@@ -1872,7 +1872,7 @@ static void super_1_sync(struct mddev *mddev, struct md_rdev *rdev)
                md_error(mddev, rdev);
        else {
                struct badblocks *bb = &rdev->badblocks;
-               u64 *bbp = (u64 *)page_address(rdev->bb_page);
+               __le64 *bbp = (__le64 *)page_address(rdev->bb_page);
                u64 *p = bb->page;
                sb->feature_map |= cpu_to_le32(MD_FEATURE_BAD_BLOCKS);
                if (bb->changed) {