Skip to content

Commit

Permalink
net: dev: Change the order of the arguments for the contended condition.
Browse files Browse the repository at this point in the history
Change the order of arguments and make qdisc_is_running() appear first.
This is more readable for the general case.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sebastian Andrzej Siewior authored and David S. Miller committed Dec 14, 2021
1 parent d0c3e46 commit a9aa5e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -3724,7 +3724,7 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
* sent after the qdisc owner is scheduled again. To prevent this
* scenario the task always serialize on the lock.
*/
contended = IS_ENABLED(CONFIG_PREEMPT_RT) || qdisc_is_running(q);
contended = qdisc_is_running(q) || IS_ENABLED(CONFIG_PREEMPT_RT);
if (unlikely(contended))
spin_lock(&q->busylock);

Expand Down

0 comments on commit a9aa5e3

Please sign in to comment.