mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-11 12:25:52 +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 commit5a0a5f7fb5
, and due to that it was misused in commit657ddeff23
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…
Reference in New Issue
Block a user