diff options
author | Jason Yan <yanaijie@huawei.com> | 2017-03-10 11:49:12 +0800 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-03-10 12:54:38 -0800 |
commit | 1345921393ba23b60d3fcf15933e699232ad25ae (patch) | |
tree | 640e5fa06bbccaf9c432cbb7b3838ad750aec5e6 /drivers/md | |
parent | 3fb632e40d7667d8bedfabc28850ac06d5493f54 (diff) | |
download | linux-stable-1345921393ba23b60d3fcf15933e699232ad25ae.tar.gz linux-stable-1345921393ba23b60d3fcf15933e699232ad25ae.tar.bz2 linux-stable-1345921393ba23b60d3fcf15933e699232ad25ae.zip |
md: fix incorrect use of lexx_to_cpu in does_sb_need_changing
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>
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 6e76d97a8fc3..f6ae1d67bcd0 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2287,7 +2287,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; |