Skip to content

Commit e20894a

Browse files
JasonYanHwgregkh
authored andcommitted
md: fix incorrect use of lexx_to_cpu in does_sb_need_changing
commit 1345921393ba23b60d3fcf15933e699232ad25ae upstream. The sb->layout is of type __le32, so we shoud use le32_to_cpu. Signed-off-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2b4f81f commit e20894a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/md/md.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2273,7 +2273,7 @@ static bool does_sb_need_changing(struct mddev *mddev)
22732273
/* Check if any mddev parameters have changed */
22742274
if ((mddev->dev_sectors != le64_to_cpu(sb->size)) ||
22752275
(mddev->reshape_position != le64_to_cpu(sb->reshape_position)) ||
2276-
(mddev->layout != le64_to_cpu(sb->layout)) ||
2276+
(mddev->layout != le32_to_cpu(sb->layout)) ||
22772277
(mddev->raid_disks != le32_to_cpu(sb->raid_disks)) ||
22782278
(mddev->chunk_sectors != le32_to_cpu(sb->chunksize)))
22792279
return true;

0 commit comments

Comments
 (0)