]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
md/raid1: simplify uptodate handling in end_sync_write
authorLi Nan <linan122@huawei.com>
Mon, 5 Jan 2026 11:02:49 +0000 (19:02 +0800)
committerYu Kuai <yukuai@fnnas.com>
Mon, 26 Jan 2026 05:16:05 +0000 (13:16 +0800)
commit090856dd8599edfc7699d1ad9bf8069b9745b313
treef01c5da74357f518391055cc4cf409369616f7fb
parent4ffe28ed0d7ce7f2f72372cb13152ad37a43ff21
md/raid1: simplify uptodate handling in end_sync_write

In end_sync_write, r1bio state is always set to either R1BIO_WriteError
or R1BIO_MadeGood. Consequently, put_sync_write_buf() never takes the
'else' branch that calls md_done_sync(), making the uptodate parameter
have no practical effect.

Pass 1 to put_sync_write_buf(). A more complete cleanup will be done in
a follow-up patch.

Link: https://lore.kernel.org/linux-raid/20260105110300.1442509-2-linan666@huaweicloud.com
Signed-off-by: Li Nan <linan122@huawei.com>
Reviewed-by: Yu Kuai <yukuai@fnnas.com>
Signed-off-by: Yu Kuai <yukuai@fnnas.com>
drivers/md/raid1.c