Commit e20894aa authored by Jason Yan's avatar Jason Yan Committed by Greg Kroah-Hartman

md: fix incorrect use of lexx_to_cpu in does_sb_need_changing

commit 13459213 upstream.

The sb->layout is of type __le32, so we shoud use le32_to_cpu.
Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarShaohua Li <shli@fb.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2b4f81fb
...@@ -2273,7 +2273,7 @@ static bool does_sb_need_changing(struct mddev *mddev) ...@@ -2273,7 +2273,7 @@ static bool does_sb_need_changing(struct mddev *mddev)
/* Check if any mddev parameters have changed */ /* Check if any mddev parameters have changed */
if ((mddev->dev_sectors != le64_to_cpu(sb->size)) || if ((mddev->dev_sectors != le64_to_cpu(sb->size)) ||
(mddev->reshape_position != le64_to_cpu(sb->reshape_position)) || (mddev->reshape_position != le64_to_cpu(sb->reshape_position)) ||
(mddev->layout != le64_to_cpu(sb->layout)) || (mddev->layout != le32_to_cpu(sb->layout)) ||
(mddev->raid_disks != le32_to_cpu(sb->raid_disks)) || (mddev->raid_disks != le32_to_cpu(sb->raid_disks)) ||
(mddev->chunk_sectors != le32_to_cpu(sb->chunksize))) (mddev->chunk_sectors != le32_to_cpu(sb->chunksize)))
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment