rps_dev_flow_table_release(): no need to delay vfree()
authorAl Viro <viro@ZenIV.linux.org.uk>
Sun, 5 May 2013 16:05:55 +0000 (16:05 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 May 2013 15:06:51 +0000 (11:06 -0400)
The same story as with fib_trie patch - vfree() from RCU callbacks
is legitimate now.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/net-sysfs.c

index f8898a435dc51609097aedc4a4ad3954d26a71f8..a94a5a0ab122e8fc577df4db38eb65c1ec543f9c 100644 (file)
@@ -593,7 +593,6 @@ struct rps_dev_flow {
 struct rps_dev_flow_table {
        unsigned int mask;
        struct rcu_head rcu;
-       struct work_struct free_work;
        struct rps_dev_flow flows[0];
 };
 #define RPS_DEV_FLOW_TABLE_SIZE(_num) (sizeof(struct rps_dev_flow_table) + \
index 7427ab5e27d80dcf1f2af0edb42ccf75e7ffb86d..981fed397d1d8af3b0d607a1ac260ad0cc847ade 100644 (file)
@@ -606,21 +606,11 @@ static ssize_t show_rps_dev_flow_table_cnt(struct netdev_rx_queue *queue,
        return sprintf(buf, "%lu\n", val);
 }
 
-static void rps_dev_flow_table_release_work(struct work_struct *work)
-{
-       struct rps_dev_flow_table *table = container_of(work,
-           struct rps_dev_flow_table, free_work);
-
-       vfree(table);
-}
-
 static void rps_dev_flow_table_release(struct rcu_head *rcu)
 {
        struct rps_dev_flow_table *table = container_of(rcu,
            struct rps_dev_flow_table, rcu);
-
-       INIT_WORK(&table->free_work, rps_dev_flow_table_release_work);
-       schedule_work(&table->free_work);
+       vfree(table);
 }
 
 static ssize_t store_rps_dev_flow_table_cnt(struct netdev_rx_queue *queue,