mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
net: sysfs: factor out link settings read
speed_show() and duplex_show() duplicate device validation, RTNL locking and the link settings query. Move this common work to sysfs_get_link_ksettings() so later locking changes stay in one place. RTNL is released before calling sysfs_emit(). The lock only protects the link settings query; formatting uses the local cmd copy, so the sysfs output and error handling remain unchanged. No functional changes. Assisted-by: LLM Signed-off-by: Wang Zhan <wang.zhan@smartx.com> Link: https://patch.msgid.link/20260903133314.3703381-2-wang.zhan@smartx.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
bf6f89ccd9
commit
fc73b71c1b
1 changed files with 48 additions and 49 deletions
Loading…
Add table
Add a link
Reference in a new issue