Skip to contentSkip to conversation

ixgbe,rcu: convert call_rcu(ring_free_rcu) to kfree_rcu()

PATCH In review Lai Jiangshan 2 participants 2 messages Mar 18, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 11/36 ixgbe,rcu: convert call_rcu(ring_free_rcu) to kfree_rcu()

The rcu callback ring_free_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(ring_free_rcu).

---
 drivers/net/ixgbe/ixgbe_main.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
drivers/net/ixgbe/ixgbe_main.c +1 -6
index 30f9ccf..3e7fff5 100644
@@ -5003,11 +5003,6 @@ err_set_interrupt:
 	return err;
 }
 
-static void ring_free_rcu(struct rcu_head *head)
-{
-	kfree(container_of(head, struct ixgbe_ring, rcu));
-}
-
 /**
  * ixgbe_clear_interrupt_scheme - Clear the current interrupt scheme settings
  * @adapter: board private structure to clear interrupt scheme on
@@ -5029,7 +5024,7 @@ void ixgbe_clear_interrupt_scheme(struct ixgbe_adapter *adapter)
 		/* ixgbe_get_stats64() might access this ring, we must wait
 		 * a grace period before freeing it.
 		 */
-		call_rcu(&ring->rcu, ring_free_rcu);
+		kfree_rcu(ring, rcu);
 		adapter->rx_ring[i] = NULL;
 	}
 
Signature · 1 line
1.7.4