netdev
[Top] [All Lists]

Re: [PATCH 9/11] PKT_SCHED: Cleanup cls_set_class

To: Tommy Christensen <tommy.christensen@xxxxxxxxx>
Subject: Re: [PATCH 9/11] PKT_SCHED: Cleanup cls_set_class
From: Thomas Graf <tgraf@xxxxxxx>
Date: Wed, 27 Oct 2004 11:42:38 +0200
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, hadi@xxxxxxxxxx
In-reply-to: <1098867450.1813.37.camel@cyan.cph.tpack.net>
References: <20041026222148.GA12289@postel.suug.ch> <20041026222813.GJ12289@postel.suug.ch> <1098867450.1813.37.camel@cyan.cph.tpack.net>
Sender: netdev-bounce@xxxxxxxxxxx
> This locks once too many.
> (And it returns an *unsigned* long.)

Thanks. I wonder how this lock could get in there.


Remove bogus lock and make cls_set_class return unsigned long.

Signed-off-by: Thomas Graf <tgraf@xxxxxxx>


--- linux-2.6.10-rc1-bk1.orig/include/net/pkt_cls.h     2004-10-26 
23:42:10.000000000 +0200
+++ linux-2.6.10-rc1-bk1/include/net/pkt_cls.h  2004-10-27 11:35:05.000000000 
+0200
@@ -28,14 +28,12 @@
        return old_cl;
 }
 
-static inline long
+static inline unsigned long
 cls_set_class(struct tcf_proto *tp, unsigned long *clp, 
        unsigned long cl)
 {
        unsigned long old_cl;
        
-       qdisc_lock_tree(tp->q->dev);
-
        tcf_tree_lock(tp);
        old_cl = __cls_set_class(clp, cl);
        tcf_tree_unlock(tp);

<Prev in Thread] Current Thread [Next in Thread>