diff options
| author | Breno Leitao <[email protected]> | 2024-07-09 14:44:00 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-07-12 01:32:48 +0000 |
| commit | 0066623d40085bb5d0af8d645a3bba27fc5cfced (patch) | |
| tree | 91a6bc92f672ab709a03338ef89e1ca7a4d6b979 /net/tipc | |
| parent | net: netconsole: Remove unnecessary cast from bool (diff) | |
| download | kernel-0066623d40085bb5d0af8d645a3bba27fc5cfced.tar.gz kernel-0066623d40085bb5d0af8d645a3bba27fc5cfced.zip | |
net: netconsole: Eliminate redundant setting of enabled field
When disabling a netconsole target, enabled_store() is called with
enabled=false. Currently, this results in updating the nt->enabled
field twice:
1. Inside the if/else block, with the target_list_lock spinlock held
2. Later, without the target_list_lock
This patch eliminates the redundancy by setting the field only once,
improving efficiency and reducing potential race conditions.
Signed-off-by: Breno Leitao <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/tipc')
0 files changed, 0 insertions, 0 deletions
