diff options
author | Christoph Hellwig <hch@lst.de> | 2019-04-04 19:56:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-25 19:16:24 +0300 |
commit | 3e8487c0ce9c0f6cc9608fb91562aa15de34696b (patch) | |
tree | 350e5e20ea897d3c47e9da0a31236c1a80e94f58 /drivers/md | |
parent | ad58eb2c5cba97ddf50471c9b6d5d48e80dd0f7a (diff) | |
download | linux-3e8487c0ce9c0f6cc9608fb91562aa15de34696b.tar.xz |
md: add a missing endianness conversion in check_sb_changes
commit ed4d0a4ea11e19863952ac6a7cea3bbb27ccd452 upstream.
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: 7564beda19b36 ("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>
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 6a98e882382c..295ff09cff4c 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -9229,7 +9229,7 @@ static void check_sb_changes(struct mddev *mddev, struct md_rdev *rdev) * reshape is happening in the remote node, we need to * update reshape_position and call start_reshape. */ - mddev->reshape_position = sb->reshape_position; + mddev->reshape_position = le64_to_cpu(sb->reshape_position); if (mddev->pers->update_reshape_pos) mddev->pers->update_reshape_pos(mddev); if (mddev->pers->start_reshape) |