md/raid5: Factor out ahead_of_reshape() function
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 16 Jun 2022 19:19:32 +0000 (13:19 -0600)
committerSong Liu <song@kernel.org>
Sun, 3 Jul 2022 14:55:40 +0000 (07:55 -0700)
commit7b19410260fb76f3febac943132710a4ea74c96d
tree5f87c2547304bd4d90b7880bab411bc990f292c6
parentcc69f703f7af795981c09e1b08bba01f257405fa
md/raid5: Factor out ahead_of_reshape() function

There are a few uses of an ugly ternary operator in raid5_make_request()
to check if a sector is a head of a reshape sector.

Factor this out into a simple helper called ahead_of_reshape().

No functional changes intended.

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