]> 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)
commit57373e0a40772473592908d754f55485e47b5fbc
tree5d9d8ef651bec9b5b57752da7e07e5e779d984db
parentc49b5e8419c7fc81e952bc8507549642f340d2ca
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