diff options
author | Jason Yan <yanaijie@huawei.com> | 2017-03-10 11:49:12 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-15 12:16:15 +0200 |
commit | 9a37d02c497cd839beee3e0cab0fc606bcfe08bf (patch) | |
tree | 1b53f39fec5ab79bb1b2da905820b315ece11e97 /drivers/md | |
parent | ce02effed0ec8f8702af643726a601bb06cd0aa9 (diff) |
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>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index eddd360624a1..1d90307a16c4 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2270,7 +2270,7 @@ static bool does_sb_need_changing(struct mddev *mddev) /* Check if any mddev parameters have changed */ if ((mddev->dev_sectors != le64_to_cpu(sb->size)) || (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->chunk_sectors != le32_to_cpu(sb->chunksize))) return true; |