ia64,rcu: Convert call_rcu(sn_irq_info_free) to kfree_rcu()
authorLai Jiangshan <laijs@cn.fujitsu.com>
Fri, 18 Mar 2011 03:48:01 +0000 (11:48 +0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 20 Jul 2011 21:10:13 +0000 (14:10 -0700)
The rcu callback sn_irq_info_free() just calls a kfree(),
so we use kfree_rcu() instead of the call_rcu(sn_irq_info_free).

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Jes Sorensen <jes@sgi.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
arch/ia64/sn/kernel/irq.c

index 81a1f4e6bcd8c65f42e3f995942b02a5433da643..485c42d97e83a3d2bfcfaca687a5573c379c5bce 100644 (file)
@@ -112,8 +112,6 @@ static void sn_ack_irq(struct irq_data *data)
        irq_move_irq(data);
 }
 
-static void sn_irq_info_free(struct rcu_head *head);
-
 struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *sn_irq_info,
                                       nasid_t nasid, int slice)
 {
@@ -177,7 +175,7 @@ struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *sn_irq_info,
        spin_lock(&sn_irq_info_lock);
        list_replace_rcu(&sn_irq_info->list, &new_irq_info->list);
        spin_unlock(&sn_irq_info_lock);
-       call_rcu(&sn_irq_info->rcu, sn_irq_info_free);
+       kfree_rcu(sn_irq_info, rcu);
 
 
 finish_up:
@@ -338,14 +336,6 @@ static void unregister_intr_pda(struct sn_irq_info *sn_irq_info)
        rcu_read_unlock();
 }
 
-static void sn_irq_info_free(struct rcu_head *head)
-{
-       struct sn_irq_info *sn_irq_info;
-
-       sn_irq_info = container_of(head, struct sn_irq_info, rcu);
-       kfree(sn_irq_info);
-}
-
 void sn_irq_fixup(struct pci_dev *pci_dev, struct sn_irq_info *sn_irq_info)
 {
        nasid_t nasid = sn_irq_info->irq_nasid;
@@ -399,7 +389,7 @@ void sn_irq_unfixup(struct pci_dev *pci_dev)
        spin_unlock(&sn_irq_info_lock);
        if (list_empty(sn_irq_lh[sn_irq_info->irq_irq]))
                free_irq_vector(sn_irq_info->irq_irq);
-       call_rcu(&sn_irq_info->rcu, sn_irq_info_free);
+       kfree_rcu(sn_irq_info, rcu);
        pci_dev_put(pci_dev);
 
 }