aboutsummaryrefslogtreecommitdiff
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2010-04-30 13:37:29 -0700
committerJoel Becker <joel.becker@oracle.com>2010-04-30 13:37:29 -0700
commitf9221fd80343285514568da6c5dbda0f87109de8 (patch)
tree3a2f0077ebea9d094bdeedb319c97cb591d51c51 /net/core/dev.c
parenta36d515c7a2dfacebcf41729f6812dbc424ebcf0 (diff)
parenta9743fcdc0eb43d028b71267438076e1b0112ba0 (diff)
Merge branch 'skip_delete_inode' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2-mark into ocfs2-fixes
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 59d4394d2ce..92584bfef09 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -80,6 +80,7 @@
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/hash.h>
+#include <linux/slab.h>
#include <linux/sched.h>
#include <linux/mutex.h>
#include <linux/string.h>
@@ -1988,8 +1989,12 @@ static struct netdev_queue *dev_pick_tx(struct net_device *dev,
if (dev->real_num_tx_queues > 1)
queue_index = skb_tx_hash(dev, skb);
- if (sk && sk->sk_dst_cache)
- sk_tx_queue_set(sk, queue_index);
+ if (sk) {
+ struct dst_entry *dst = rcu_dereference(sk->sk_dst_cache);
+
+ if (dst && skb_dst(skb) == dst)
+ sk_tx_queue_set(sk, queue_index);
+ }
}
}