On Thu, Jun 02, 2022 at 12:18:11PM -0600, Logan Gunthorpe wrote: > 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. Looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>