mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
net: drop rtnl_lock for queue_mgmt operations
All drivers that use queue API are already converted to use netdev instance lock. Move netdev instance lock management to the netlink layer and drop rtnl_lock. Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Reviewed-by: Mina Almasry. <almasrymina@google.com> Link: https://patch.msgid.link/20250311144026.4154277-4-sdf@fomichev.me Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
10eef096be
commit
1d22d3060b
@@ -787,7 +787,7 @@ nsim_qreset_write(struct file *file, const char __user *data,
|
||||
if (ret != 2)
|
||||
return -EINVAL;
|
||||
|
||||
rtnl_lock();
|
||||
netdev_lock(ns->netdev);
|
||||
if (queue >= ns->netdev->real_num_rx_queues) {
|
||||
ret = -EINVAL;
|
||||
goto exit_unlock;
|
||||
@@ -801,7 +801,7 @@ nsim_qreset_write(struct file *file, const char __user *data,
|
||||
|
||||
ret = count;
|
||||
exit_unlock:
|
||||
rtnl_unlock();
|
||||
netdev_unlock(ns->netdev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user