md/raid5: Factor out ahead_of_reshape() function
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 16 Jun 2022 19:19:32 +0000 (13:19 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:14:40 +0000 (17:14 -0600)
commita8bb304ca5b8c833d4874b322a6ef993bec98780
treecfcc870a9ec98a2536ba76b0b093ab28f539db04
parent6e3f50d30af847bebce072182bd735e90a294c6a
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>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/raid5.c