diff options
author | Li Nan <linan122@huawei.com> | 2024-05-26 02:52:56 +0800 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2024-06-10 19:10:25 +0000 |
commit | 03e792eaf18ec2e93e2c623f9f1a4bdb97fe4126 (patch) | |
tree | b4489fc0f5ca330e5123b1aac986116a91aeb0f2 /drivers/md/raid5.c | |
parent | a8768a134518e406d41799a3594aeb74e0889cf7 (diff) | |
download | linux-03e792eaf18ec2e93e2c623f9f1a4bdb97fe4126.tar.gz linux-03e792eaf18ec2e93e2c623f9f1a4bdb97fe4126.tar.bz2 linux-03e792eaf18ec2e93e2c623f9f1a4bdb97fe4126.zip |
md: change the return value type of md_write_start to void
Commit cc27b0c78c79 ("md: fix deadlock between mddev_suspend() and
md_write_start()") aborted md_write_start() with false when mddev is
suspended, which fixed a deadlock if calling mddev_suspend() with
holding reconfig_mutex(). Since mddev_suspend() now includes
lockdep_assert_not_held(), it no longer holds the reconfig_mutex. This
makes previous abort unnecessary. Now, remove unnecessary abort and
change function return value to void.
Signed-off-by: Li Nan <linan122@huawei.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20240525185257.3896201-2-linan666@huaweicloud.com
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 2bd1ce9b3922..a84389311dd1 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -6078,8 +6078,7 @@ static bool raid5_make_request(struct mddev *mddev, struct bio * bi) ctx.do_flush = bi->bi_opf & REQ_PREFLUSH; } - if (!md_write_start(mddev, bi)) - return false; + md_write_start(mddev, bi); /* * If array is degraded, better not do chunk aligned read because * later we might have to read it again in order to reconstruct |