From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Jason Yan <yanaijie@huawei.com>,
Shaohua Li <shli@fb.com>
Subject: [PATCH 4.9 16/25] md: fix incorrect use of lexx_to_cpu in does_sb_need_changing
Date: Thu, 13 Jul 2017 17:40:30 +0200 [thread overview]
Message-ID: <20170713154002.582787829@linuxfoundation.org> (raw)
In-Reply-To: <20170713154001.535209166@linuxfoundation.org>
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Yan <yanaijie@huawei.com>
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>
---
drivers/md/md.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -2270,7 +2270,7 @@ static bool does_sb_need_changing(struct
/* 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;
next prev parent reply other threads:[~2017-07-13 15:41 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-13 15:40 [PATCH 4.9 00/25] 4.9.38-stable review Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 01/25] mqueue: fix a use-after-free in sys_mq_notify() Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 02/25] Add "shutdown" to "struct class" Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 03/25] tpm: Issue a TPM2_Shutdown for TPM2 devices Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 04/25] tools include: Add a __fallthrough statement Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 05/25] tools string: Use __fallthrough in perf_atoll() Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 06/25] tools strfilter: Use __fallthrough Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 07/25] perf top: " Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 08/25] perf thread_map: Correctly size buffer used with dirent->dt_name Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 09/25] perf intel-pt: Use __fallthrough Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 10/25] perf tests: Avoid possible truncation with dirent->d_name + snprintf Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 11/25] perf bench numa: Avoid possible truncation when using snprintf() Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 12/25] perf header: Fix handling of PERF_EVENT_UPDATE__SCALE Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 13/25] perf scripting perl: Fix compile error with some perl5 versions Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 14/25] perf probe: Fix to probe on gcc generated symbols for offline kernel Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 15/25] perf probe: Add error checks to offline probe post-processing Greg Kroah-Hartman
2017-07-13 15:40 ` Greg Kroah-Hartman [this message]
2017-07-13 15:40 ` [PATCH 4.9 17/25] md: fix super_offset endianness in super_1_rdev_size_change Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 18/25] locking/rwsem-spinlock: Fix EINTR branch in __down_write_common() Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 19/25] staging: vt6556: vnt_start Fix missing call to vnt_key_init_table Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 20/25] staging: comedi: fix clean-up of comedi_class in comedi_init() Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 23/25] ext4: check return value of kstrtoull correctly in reserved_clusters_store Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 24/25] x86/mm/pat: Dont report PAT on CPUs that dont support it Greg Kroah-Hartman
2017-07-13 15:40 ` [PATCH 4.9 25/25] [media] saa7134: fix warm Medion 7134 EEPROM read Greg Kroah-Hartman
2017-07-13 16:47 ` [PATCH 4.9 00/25] 4.9.38-stable review Sumit Semwal
2017-07-14 1:34 ` Guenter Roeck
[not found] ` <5967dc72.7187df0a.f1fb5.37a1@mx.google.com>
2017-07-14 9:52 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170713154002.582787829@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shli@fb.com \
--cc=stable@vger.kernel.org \
--cc=yanaijie@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).