Re: [PATCH v3 05/11] md/raid5-cache: Drop RCU usage of conf->log
From: Christoph Hellwig
Date: Fri Jun 03 2022 - 02:43:17 EST
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>