Skip to content

Commit fa44bc8

Browse files
committed
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 5a0a5f7, and due to that it was misused in commit 657ddef and since then the lock being taken was shared rather than exclusive. Signed-off-by: Martin Kletzander <[email protected]> Reviewed-by: Andrea Bolognani <[email protected]> Reviewed-by: Ján Tomko <[email protected]>
1 parent e648616 commit fa44bc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/virresctrl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ virResctrlLockWrite(void)
463463
return -1;
464464
}
465465

466-
if (virFileFlock(fd, true, true) < 0) {
466+
if (virFileFlock(fd, true, false) < 0) {
467467
virReportSystemError(errno, "%s", _("Cannot lock resctrl"));
468468
VIR_FORCE_CLOSE(fd);
469469
return -1;

0 commit comments

Comments
 (0)