Blame SOURCES/0001-depmod-prevent-module-dependency-files-missing-durin.patch
|
|
5fb698 |
From c2996b5fa880e81f63c25e80a4157b2239e32c5d Mon Sep 17 00:00:00 2001
|
|
|
5fb698 |
From: Michal Suchanek <msuchanek@suse.de>
|
|
|
5fb698 |
Date: Mon, 10 Dec 2018 22:29:32 +0100
|
|
|
5fb698 |
Subject: [PATCH 1/2] depmod: prevent module dependency files missing during
|
|
|
5fb698 |
depmod invocation
|
|
|
5fb698 |
|
|
|
5fb698 |
depmod deletes the module dependency files before moving the temporary
|
|
|
5fb698 |
files in their place. This results in user seeing no dependency files
|
|
|
5fb698 |
while they are updated. Remove the unlink call. The rename call should
|
|
|
5fb698 |
suffice to move the new file in place and unlink the old one. It should
|
|
|
5fb698 |
also do both atomically so there is no window when no dependency file
|
|
|
5fb698 |
exists.
|
|
|
5fb698 |
|
|
|
5fb698 |
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
|
|
|
5fb698 |
---
|
|
|
5fb698 |
tools/depmod.c | 1 -
|
|
|
5fb698 |
1 file changed, 1 deletion(-)
|
|
|
5fb698 |
|
|
|
5fb698 |
diff --git a/tools/depmod.c b/tools/depmod.c
|
|
|
5fb698 |
index 989d9077926c..18c0d61b2db3 100644
|
|
|
5fb698 |
--- a/tools/depmod.c
|
|
|
5fb698 |
+++ b/tools/depmod.c
|
|
|
5fb698 |
@@ -2451,7 +2451,6 @@ static int depmod_output(struct depmod *depmod, FILE *out)
|
|
|
5fb698 |
break;
|
|
|
5fb698 |
}
|
|
|
5fb698 |
|
|
|
5fb698 |
- unlinkat(dfd, itr->name, 0);
|
|
|
5fb698 |
if (renameat(dfd, tmp, dfd, itr->name) != 0) {
|
|
|
5fb698 |
err = -errno;
|
|
|
5fb698 |
CRIT("renameat(%s, %s, %s, %s): %m\n",
|
|
|
5fb698 |
--
|
|
|
5fb698 |
2.33.0
|
|
|
5fb698 |
|