According to Documentation/RCU/Design/Requirements/Requirements.html calling these functions is not necessary for dynamically allocated objects: The corresponding <tt>rcu_head</tt> structures that are dynamically allocated are automatically tracked, but <tt>rcu_head</tt> structures allocated on the stack must be initialized with <tt>init_rcu_head_on_stack()</tt> and cleaned up with <tt>destroy_rcu_head_on_stack()</tt>. Similarly, statically allocated non-stack <tt>rcu_head</tt> structures must be initialized with <tt>init_rcu_head()</tt> and cleaned up with <tt>destroy_rcu_head()</tt>. Hence remove the calls to these functions from the SCSI core. Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxx> --- drivers/scsi/hosts.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index a0a7e4ff255c..7279d3d2e941 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -334,8 +334,6 @@ static void scsi_host_dev_release(struct device *dev) if (shost->work_q) destroy_workqueue(shost->work_q); - destroy_rcu_head(&shost->rcu); - if (shost->shost_state == SHOST_CREATED) { /* * Free the shost_dev device name here if scsi_host_alloc() @@ -404,7 +402,6 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) INIT_LIST_HEAD(&shost->starved_list); init_waitqueue_head(&shost->host_wait); mutex_init(&shost->scan_mutex); - init_rcu_head(&shost->rcu); index = ida_simple_get(&host_index_ida, 0, 0, GFP_KERNEL); if (index < 0) -- 2.15.1