summaryrefslogtreecommitdiff
path: root/kernel/mutex-debug.c
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2025-09-03 09:41:40 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-09 18:58:27 +0200
commitfd0333fe3cb17c15e320f57dca2c698440f344de (patch)
treecb1d82176076e1d3dc3183851e886f8166afc946 /kernel/mutex-debug.c
parent8352fdfc04db3bd199edf7f2b12d9579d1da9ab5 (diff)
md/raid1: fix data lost for writemostly rdev
[ Upstream commit 93dec51e716db88f32d770dc9ab268964fff320b ] If writemostly is enabled, alloc_behind_master_bio() will allocate a new bio for rdev, with bi_opf set to 0. Later, raid1_write_request() will clone from this bio, hence bi_opf is still 0 for the cloned bio. Submit this cloned bio will end up to be read, causing write data lost. Fix this problem by inheriting bi_opf from original bio for behind_mast_bio. Fixes: e879a0d9cb08 ("md/raid1,raid10: don't ignore IO flags") Reported-and-tested-by: Ian Dall <ian@beware.dropbear.id.au> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220507 Link: https://lore.kernel.org/linux-raid/20250903014140.3690499-1-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai <yukuai3@huawei.com> Reviewed-by: Li Nan <linan122@huawei.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel/mutex-debug.c')
0 files changed, 0 insertions, 0 deletions