git/list[1] front-page[2] threads[3] people[4] search[5] about
 

fix potential deadlock in create_one_file

From
Alex Riesen <raa.lkml@gmail.com>
Date
Jan 5, 2006, 09:00 UTC
Message-ID
<81b0412b0601050100v519e76c8u11f4d484f9d28e0a@mail.gmail.com>

It can happen if the temporary file already exists (i.e. after a panic and reboot).

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Subject: [PATCH] fix potential deadlock in create_one_file.
It can happen if the temporary file already exists.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 apply.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
f7ac9127638a013d0f1d60e02a06fde10909824c
diff --git a/apply.c b/apply.c
index d5e7bfd..ff3782b 100644
--- a/apply.c
+++ b/apply.c
@@ -1635,7 +1635,8 @@ static void create_one_file(const char *
 			}
 			if (errno != EEXIST)
 				break;
-		}			
+			++nr;
+		}
 	}
 	die("unable to write file %s mode %o", path, mode);
 }
-- 
1.0.GIT
Next: Junio C Hamano
Message 1 of 2 in “fix potential deadlock in create_one_file”
  1. Alex RiesenJan 5, 2006
  2. Junio C HamanoJan 6, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.