Henrique Dante de Almeida | 20 Jun 2012 23:02

[PATCH] depmod: atomically rename and unlink file

Remove unlinkat call before renameat
---
 tools/depmod.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/depmod.c b/tools/depmod.c
index 834bb05..3399a4e 100644
--- a/tools/depmod.c
+++ b/tools/depmod.c
 <at>  <at>  -2274,7 +2274,6  <at>  <at>  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",
--

-- 
1.7.9.5


Gmane