From: Lennart Poettering Date: Sat, 9 Jun 2012 08:30:44 +0000 (+0200) Subject: journal: correct list link up on hash collisions X-Git-Tag: v186~150 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=8db4213e7b38ebc54bfdc7215991cc23b9580e3a;ds=inline journal: correct list link up on hash collisions --- diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 8f301b87f..9cec140f5 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -596,7 +596,7 @@ static int journal_file_link_data(JournalFile *f, Object *o, uint64_t offset, ui o->data.n_entries = 0; h = hash % (le64toh(f->header->data_hash_table_size) / sizeof(HashItem)); - p = le64toh(f->data_hash_table[h].head_hash_offset); + p = le64toh(f->data_hash_table[h].tail_hash_offset); if (p == 0) { /* Only entry in the hash table is easy */ f->data_hash_table[h].head_hash_offset = htole64(offset);