summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/tagcache.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 017d1326aa..9f4769258f 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -390,7 +390,7 @@ static long find_entry_ram(const char *filename,
390 int i; 390 int i;
391 391
392 /* Check if tagcache is loaded into ram. */ 392 /* Check if tagcache is loaded into ram. */
393 if (!tc_stat.ramcache) 393 if (!tc_stat.ramcache || !is_dircache_intact())
394 return -1; 394 return -1;
395 395
396 if (dc == NULL) 396 if (dc == NULL)
@@ -538,8 +538,7 @@ static int find_index(const char *filename)
538 long idx_id = -1; 538 long idx_id = -1;
539 539
540#if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) 540#if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE)
541 if (tc_stat.ramcache && is_dircache_intact()) 541 idx_id = find_entry_ram(filename, NULL);
542 idx_id = find_entry_ram(filename, NULL);
543#endif 542#endif
544 543
545 if (idx_id < 0) 544 if (idx_id < 0)
@@ -1804,10 +1803,7 @@ static void __attribute__ ((noinline)) add_tagcache(char *path,
1804 1803
1805 /* Check if the file is already cached. */ 1804 /* Check if the file is already cached. */
1806#if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) 1805#if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE)
1807 if (tc_stat.ramcache && is_dircache_intact()) 1806 idx_id = find_entry_ram(path, dc);
1808 {
1809 idx_id = find_entry_ram(path, dc);
1810 }
1811#endif 1807#endif
1812 1808
1813 /* Be sure the entry doesn't exist. */ 1809 /* Be sure the entry doesn't exist. */