]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid5-ppl: Annotate with rcu_dereference_protected()
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 7 Apr 2022 16:57:12 +0000 (10:57 -0600)
committerSong Liu <song@kernel.org>
Mon, 25 Apr 2022 21:00:37 +0000 (14:00 -0700)
commit441d7726621d8aa309a137d151e5a99d8c9e3002
treea68d4a8c8cef1b094044a720eaf31ed18e52ea6d
parentdf40959a946c503a8526304119505803b564523f
md/raid5-ppl: Annotate with rcu_dereference_protected()

To suppress the last remaining sparse warnings about accessing
rdev, add rcu_dereference_protected calls to a couple places
in raid5-ppl. All of these places are called under raid5_run and
therefore are occurring before the array has started and is thus
safe.

There's no sensible check to do for the second argument of
rcu_dereference_protected() so a comment is added instead.

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-ppl.c