Re: [PATCH] node_device: Do not lock the driver state needlessly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On a Wednesday in 2025, Martin Kletzander wrote:
On Fri, Feb 07, 2025 at 04:32:07PM +0100, Ján Tomko wrote:
On a Friday in 2025, Martin Kletzander wrote:
When processing the PCI devices we can only read the configs for each of
them if running as privileged.  That information is saved in the driver
state as a boolean introduced in commit 643c74abff01.  However since

Please don't put a period right after commit IDs.


That's fine, it's not a period, but a full stop.  Just like in commit
4a6b246d3941e8e6ff22a951dae103594b5d2096 for example.  If that is still an
issue please file a bug report for git revert messaging.

that version it is only written to once during nodeStateInitialize() and
only read from that point (apart from some commits around v3.9.0 release
when it was not even set, but that was fixed before v3.10.0).  And it is
only read once, just to store that boolean in a temporary variable which
is also used in only one condition.

Rewrite this without locking and save few lines of code.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
src/node_device/node_device_udev.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)


Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>


Thank you


You're welcome...

Jano

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux