Skip to content

Commit ed4d0a4

Browse files
Christoph Hellwigliu-song-6
authored andcommitted
md: add a missing endianness conversion in check_sb_changes
The on-disk value is little endian and we need to convert it to native endian before storing the value in the in-core structure. Fixes: 7564bed ("md-cluster/raid10: support add disk under grow mode") Cc: <stable@vger.kernel.org> # 4.20+ Acked-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Song Liu <songliubraving@fb.com>
1 parent ee37e62 commit ed4d0a4

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
@@ -9227,7 +9227,7 @@ static void check_sb_changes(struct mddev *mddev, struct md_rdev *rdev)
92279227
* reshape is happening in the remote node, we need to
92289228
* update reshape_position and call start_reshape.
92299229
*/
9230-
mddev->reshape_position = sb->reshape_position;
9230+
mddev->reshape_position = le64_to_cpu(sb->reshape_position);
92319231
if (mddev->pers->update_reshape_pos)
92329232
mddev->pers->update_reshape_pos(mddev);
92339233
if (mddev->pers->start_reshape)

0 commit comments

Comments
 (0)