mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
resctrl: Use exclusive lock for /sys/fs/resctrl
That's the way it should've been all the time. It was originally the case, but then the rework to virFileFlock() made the function ambiguous when it was created in commit 5a0a5f7fb5f5, and due to that it was misused in commit 657ddeff2313 and since then the lock being taken was shared rather than exclusive. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
e648616a6a
commit
fa44bc8fd0
@ -463,7 +463,7 @@ virResctrlLockWrite(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (virFileFlock(fd, true, true) < 0) {
|
||||
if (virFileFlock(fd, true, false) < 0) {
|
||||
virReportSystemError(errno, "%s", _("Cannot lock resctrl"));
|
||||
VIR_FORCE_CLOSE(fd);
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user