From: Lennart Poettering Date: Thu, 23 Apr 2020 09:53:51 +0000 (+0200) Subject: journal: don't assert on mmap'ed object type X-Git-Tag: v246-rc1~315^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0600ff0e66f844ade3fe4e44c54dc05e67c28026;p=thirdparty%2Fsystemd.git journal: don't assert on mmap'ed object type Mappings canbe replaced by all zeroes under our feet if vacuuming decides to unallocate some file. Hence let's not check for this kind of stuff in an assert. (Typically, we should genreate runtime errors in this case, in particular EBADMSG, which the callers generally look for. But in this case this is just an extra precaution check anyway, so let's just remove it.) --- diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 720ec361452..ca80eb2f1c6 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -119,7 +119,6 @@ static void init_location(Location *l, LocationType type, JournalFile *f, Object assert(l); assert(IN_SET(type, LOCATION_DISCRETE, LOCATION_SEEK)); assert(f); - assert(o->object.type == OBJECT_ENTRY); *l = (Location) { .type = type,