Skip to content

Commit 3f76df1

Browse files
congwangdavem330
authored andcommitted
net: use dev_change_tx_queue_len() for SIOCSIFTXQLEN
As noticed by Eric, we need to switch to the helper dev_change_tx_queue_len() for SIOCSIFTXQLEN call path too, otheriwse still miss dev_qdisc_change_tx_queue_len(). Fixes: 6a643dd ("net: introduce helper dev_change_tx_queue_len()") Reported-by: Eric Dumazet <[email protected]> Signed-off-by: Cong Wang <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ced9e19 commit 3f76df1

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

net/core/dev_ioctl.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -285,16 +285,9 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
285285
if (ifr->ifr_qlen < 0)
286286
return -EINVAL;
287287
if (dev->tx_queue_len ^ ifr->ifr_qlen) {
288-
unsigned int orig_len = dev->tx_queue_len;
289-
290-
dev->tx_queue_len = ifr->ifr_qlen;
291-
err = call_netdevice_notifiers(
292-
NETDEV_CHANGE_TX_QUEUE_LEN, dev);
293-
err = notifier_to_errno(err);
294-
if (err) {
295-
dev->tx_queue_len = orig_len;
288+
err = dev_change_tx_queue_len(dev, ifr->ifr_qlen);
289+
if (err)
296290
return err;
297-
}
298291
}
299292
return 0;
300293

0 commit comments

Comments
 (0)