From 1b8951e5bd9b2bf1722098a861055cae0bb52088 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Fri, 12 Dec 2014 21:52:18 +0100 Subject: journal: remove journal_file_object_keep/release functions The only user is sd_journal_enumerate_unique() and, as explained in the previous commit (fed67c38e3 "journal: map objects to context set by caller, not by actual object type"), the use of them there is now superfluous. Let's remove them. This reverts major parts of commits: ae97089d49 journal: fix access to munmapped memory in sd_journal_enumerate_unique 06cc69d44c sd-journal: fix sd_journal_enumerate_unique skipping values Tested with an "--enable-debug" build and "journalctl --list-boots". It gives the expected number of results. Additionally, if I then revert the previous commit ("journal: map objects to context set by caller, not to actual object type"), it crashes with SIGSEGV, as expected. --- src/journal/journal-file.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/journal/journal-file.h') diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h index 211e121d5c..c5a92bc5ff 100644 --- a/src/journal/journal-file.h +++ b/src/journal/journal-file.h @@ -211,15 +211,3 @@ static unsigned type_to_context(int type) { /* One context for each type, plus one catch-all for the rest */ return type > 0 && type < _OBJECT_TYPE_MAX ? type : 0; } - -static inline int journal_file_object_keep(JournalFile *f, Object *o, uint64_t offset, void **release_cookie) { - unsigned context = type_to_context(o->object.type); - uint64_t s = le64toh(o->object.size); - - return mmap_cache_get(f->mmap, f->fd, f->prot, context, true, - offset, s, &f->last_stat, NULL, release_cookie); -} - -static inline int journal_file_object_release(JournalFile *f, void *release_cookie) { - return mmap_cache_release(f->mmap, f->fd, release_cookie); -} -- cgit v1.2.3-54-g00ecf