netdev
[Top] [All Lists]

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

To: Thomas Graf <tgraf@xxxxxxx>
Subject: Re: [PATCH 9/11] PKT_SCHED: Cleanup cls_set_class
From: Tommy Christensen <tommy.christensen@xxxxxxxxx>
Date: 27 Oct 2004 10:57:31 +0200
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, hadi@xxxxxxxxxx
In-reply-to: <20041026222813.GJ12289@postel.suug.ch>
Organization:
References: <20041026222148.GA12289@postel.suug.ch> <20041026222813.GJ12289@postel.suug.ch>
Sender: netdev-bounce@xxxxxxxxxxx
On Wed, 2004-10-27 at 00:28, Thomas Graf wrote:
> +static inline 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);
> + 
> +     return old_cl;
> +}
> +

This locks once too many.
(And it returns an *unsigned* long.)

-Tommy


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