]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: remove redundant ASSERT_RTNL() in queue setup functions
authorStanislav Fomichev <stfomichev@gmail.com>
Mon, 16 Jun 2025 16:21:15 +0000 (09:21 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Jun 2025 01:53:51 +0000 (18:53 -0700)
The existing netdev_ops_assert_locked() already asserts that either
the RTNL lock or the per-device lock is held, making the explicit
ASSERT_RTNL() redundant.

Cc: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: Stanislav Fomichev <stfomichev@gmail.com>
Link: https://patch.msgid.link/20250616162117.287806-5-stfomichev@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/dev.c

index 43f56b44f3514ce0f825a3ce984c4708e39dd210..df1678b1fe247c38809f8bc61f019c911f5ae016 100644 (file)
@@ -3179,7 +3179,6 @@ int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq)
 
        if (dev->reg_state == NETREG_REGISTERED ||
            dev->reg_state == NETREG_UNREGISTERING) {
-               ASSERT_RTNL();
                netdev_ops_assert_locked(dev);
 
                rc = netdev_queue_update_kobjects(dev, dev->real_num_tx_queues,
@@ -3229,7 +3228,6 @@ int netif_set_real_num_rx_queues(struct net_device *dev, unsigned int rxq)
                return -EINVAL;
 
        if (dev->reg_state == NETREG_REGISTERED) {
-               ASSERT_RTNL();
                netdev_ops_assert_locked(dev);
 
                rc = net_rx_queue_update_kobjects(dev, dev->real_num_rx_queues,