* fix potential deadlock in create_one_file
@ 2006-01-05 9:00 Alex Riesen
2006-01-06 22:38 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Alex Riesen @ 2006-01-05 9:00 UTC (permalink / raw)
To: Junio C Hamano, git
[-- Attachment #1: Type: text/plain, Size: 137 bytes --]
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>
[-- Attachment #2: 0002-fix-potential-deadlock-in-create_one_file.txt --]
[-- Type: text/plain, Size: 572 bytes --]
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-01-06 22:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-05 9:00 fix potential deadlock in create_one_file Alex Riesen
2006-01-06 22:38 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox