From d9e08be9d5b632aed84d4ee870543babafe6614b Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Thu, 5 Jan 2006 10:00:12 +0100 Subject: [PATCH] fix potential deadlock in create_one_file It can happen if the temporary file already exists (i.e. after a panic and reboot). Signed-off-by: Alex Riesen Signed-off-by: Junio C Hamano --- apply.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apply.c b/apply.c index 9eba034e5..c471a82e8 100644 --- a/apply.c +++ b/apply.c @@ -1635,7 +1635,8 @@ static void create_one_file(const char *path, unsigned mode, const char *buf, un } if (errno != EEXIST) break; - } + ++nr; + } } die("unable to write file %s mode %o", path, mode); } -- 2.30.2