Attached is a big bugfix for the original patch. Sorry for the breakage.
commit 54984c1bc3635efbe0661c0bdd98eb5083555e38
Author: Eric Wong <[email protected]>
Date: Thu Nov 8 00:56:10 2012 +0000
filecache: unlink cache entry on HEAD failure during open
Since we insert a stillborn entry to avoid duplicate entries
during file_cache_open(), we need to unlink the stillborn entry
if the file no longer exists on the server.
>From 54984c1bc3635efbe0661c0bdd98eb5083555e38 Mon Sep 17 00:00:00 2001
From: Eric Wong <[email protected]>
Date: Thu, 8 Nov 2012 00:56:10 +0000
Subject: [PATCH] filecache: unlink cache entry on HEAD failure during open
Since we insert a stillborn entry to avoid duplicate entries
during file_cache_open(), we need to unlink the stillborn entry
if the file no longer exists on the server.
---
src/filecache.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/filecache.c b/src/filecache.c
index 8b26b68..af9efac 100644
--- a/src/filecache.c
+++ b/src/filecache.c
@@ -242,6 +242,7 @@ fail:
if (fi) {
pthread_mutex_unlock(&fi->mutex);
+ file_cache_unlink(fi);
file_cache_free_unlocked(fi);
}
--
1.8.0.3.gdd57fab.dirty