diff options
| author | Dipankar Sarma <dipankar@in.ibm.com> | 2004-08-22 22:58:51 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-22 22:58:51 -0700 |
| commit | 5dae7a69a46f3a9f6562a4702f8beaa7f77e94f6 (patch) | |
| tree | 40daf62eb530c10372f9cb90f600a0b040c5e725 /net/core/dev.c | |
| parent | 9711268caede0cbd322244d70145a6e914fac52e (diff) | |
[PATCH] rcu: abstracted RCU dereferencing
Use abstracted RCU API to dereference RCU protected data. Hides barrier
details. Patch from Paul McKenney.
This patch introduced an rcu_dereference() macro that replaces most uses of
smp_read_barrier_depends(). The new macro has the advantage of explicitly
documenting which pointers are protected by RCU -- in contrast, it is
sometimes difficult to figure out which pointer is being protected by a given
smp_read_barrier_depends() call.
Signed-off-by: Paul McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net/core/dev.c')
| -rw-r--r-- | net/core/dev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 547469d2ac6f..a67e65a0f267 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1332,8 +1332,7 @@ int dev_queue_xmit(struct sk_buff *skb) * also serializes access to the device queue. */ - q = dev->qdisc; - smp_read_barrier_depends(); + q = rcu_dereference(dev->qdisc); #ifdef CONFIG_NET_CLS_ACT skb->tc_verd = SET_TC_AT(skb->tc_verd,AT_EGRESS); #endif |
