]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid5: Refactor raid5_make_request loop
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 16 Jun 2022 19:19:33 +0000 (13:19 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:14:40 +0000 (17:14 -0600)
commit79a059e47c054608d51abce1297bfce1d1d063be
tree5d9d8ef651bec9b5b57752da7e07e5e779d984db
parentcc992c0ec97ba4aacadc207935dbb3622b065cf7
md/raid5: Refactor raid5_make_request loop

Break immediately if raid5_get_active_stripe() returns NULL and deindent
the rest of the loop. Annotate this check with an unlikely().

This makes the code easier to read and reduces the indentation level.

No functional changes intended.

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>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/raid5.c