diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/journal/journal-file.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 6c9deacf2c..3df099dbd2 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -1328,6 +1328,11 @@ static void chain_cache_put( uint64_t total) { if (!ci) { + /* If the chain item to cache for this chain is the + * first one it's not worth caching anything */ + if (array == first) + return; + if (hashmap_size(h) >= CHAIN_CACHE_MAX) ci = hashmap_steal_first(h); else { |