Thread (14 messages) 14 messages, 3 authors, 2018-12-18
STALE2749d
Revisions (2)
  1. v2 current
  2. v3 [diff vs current]

[PATCH v2 1/3] depmod: prevent module dependency files missing during depmod invocation.

From: Michal Suchanek <hidden>
Date: 2018-12-10 21:29:52
Subsystem: the rest · Maintainer: Linus Torvalds

Depmod deletes the module dependency files before moving the temporary
files in their place. This results in user seeing no dependency files
while they are updated. Remove the unlink call. The rename call should
suffice to move the new file in place and unlink the old one. It should
also do both atomically so there is no window when no dependency file
exists.

Signed-off-by: Michal Suchanek <redacted>
---
 tools/depmod.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/tools/depmod.c b/tools/depmod.c
index 989d9077926c..18c0d61b2db3 100644
--- a/tools/depmod.c
+++ b/tools/depmod.c
@@ -2451,7 +2451,6 @@ static int depmod_output(struct depmod *depmod, FILE *out)
 			break;
 		}
 
-		unlinkat(dfd, itr->name, 0);
 		if (renameat(dfd, tmp, dfd, itr->name) != 0) {
 			err = -errno;
 			CRIT("renameat(%s, %s, %s, %s): %m\n",
-- 
2.19.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help