md/raid5: Don't read ->active_stripes if it's not needed
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 11 Aug 2022 17:14:17 +0000 (11:14 -0600)
committerSong Liu <song@kernel.org>
Thu, 22 Sep 2022 07:05:04 +0000 (00:05 -0700)
commitf9287c3e93f00d3236c4c81bf76dae43afd903b9
tree5e8e54d42d7422880e21544f665c88b7353b9fe9
parent2f2d51efd83225c1eb0d7771ddfe9fddd5ccd378
md/raid5: Don't read ->active_stripes if it's not needed

The atomic_read() is not needed in many cases so only do
the read after the first checks are done.

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