OSDN Git Service

md: fix super_offset endianness in super_1_rdev_size_change
authorJason Yan <yanaijie@huawei.com>
Fri, 10 Mar 2017 03:27:23 +0000 (11:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Jul 2017 10:16:15 +0000 (12:16 +0200)
commit3953403ca660817a33e7f7ad65a265facc0e59c7
treef23fe0f7f5a1d8ef9cf3e2c33b74382c28875224
parent9a37d02c497cd839beee3e0cab0fc606bcfe08bf
md: fix super_offset endianness in super_1_rdev_size_change

commit 3fb632e40d7667d8bedfabc28850ac06d5493f54 upstream.

The sb->super_offset should be big-endian, but the rdev->sb_start is in
host byte order, so fix this by adding cpu_to_le64.

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>
drivers/md/md.c