Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[systemd] Don't fsync after writing machine-id. Fixes JB#52613
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
rpm/systemd-machine-id-setup-Don-t-fsync-after-writing.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From a54d57dc475f0e03552d7d8237db1ee79cc0216a Mon Sep 17 00:00:00 2001 | ||
From: Ville Nummela <ville.nummela@jolla.com> | ||
Date: Tue, 5 Jan 2021 07:44:36 +0200 | ||
Subject: [PATCH] machine-id-setup: Don't fsync after writing | ||
|
||
fsync_directory_of_file always fails if proc is not mounted. | ||
--- | ||
src/core/machine-id-setup.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c | ||
index 1b7424800c..157d8f3c9e 100644 | ||
--- a/src/core/machine-id-setup.c | ||
+++ b/src/core/machine-id-setup.c | ||
@@ -155,7 +155,7 @@ int machine_id_setup(const char *root, sd_id128_t machine_id, sd_id128_t *ret) { | ||
if (ftruncate(fd, 0) < 0) | ||
return log_error_errno(errno, "Failed to truncate %s: %m", etc_machine_id); | ||
|
||
- if (id128_write_fd(fd, ID128_PLAIN, machine_id, true) >= 0) | ||
+ if (id128_write_fd(fd, ID128_PLAIN, machine_id, false) >= 0) | ||
goto finish; | ||
} | ||
|
||
-- | ||
2.17.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters