md/raid5-cache: Drop RCU usage of conf->log
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 8 Jun 2022 16:27:51 +0000 (10:27 -0600)
committerSong Liu <song@kernel.org>
Sun, 3 Jul 2022 14:55:37 +0000 (07:55 -0700)
commit33fa9f7c08f7e2258f117a21a4c0bfc5bc146e20
treec5d714464e9045768053684510cee2074a7a2eb3
parentc2270aede3a1059c43b5af0561374bde82b7d313
md/raid5-cache: Drop RCU usage of conf->log

The only place that uses RCU to access conf->log is in
r5l_log_disk_error(). This function is mostly used in the IO path
and once with mddev_lock() held in raid5_change_consistency_policy().

It is known that the IO will be suspended before the log is freed and
r5l_log_exit() is called with the mddev_lock() held.

This should mean that conf->log can not be freed while the function is
being called, so the RCU protection is not necessary. Drop the
rcu_read_lock() as well as the synchronize_rcu() and
rcu_assign_pointer() usage.

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