md/raid5: Drop the do_prepare flag in raid5_make_request()
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 16 Jun 2022 19:19:37 +0000 (13:19 -0600)
committerSong Liu <song@kernel.org>
Sun, 3 Jul 2022 14:55:41 +0000 (07:55 -0700)
commit7f181f7bfeb86dccc62ef9747a859fd3144087fd
tree426beab2c6fe51191df57075b650a84285200fe4
parent09cf533457791bf2ee15e7e370f44032ca64101a
md/raid5: Drop the do_prepare flag in raid5_make_request()

prepare_to_wait() can be reasonably called after schedule instead of
setting a flag and preparing in the next loop iteration.

This means that prepare_to_wait() will be called before
read_seqcount_begin(), but there shouldn't be any reason that the order
matters here. On the first iteration of the loop prepare_to_wait() is
already called first.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/raid5.c