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.)
This commit is contained in:
Lennart Poettering
2020-04-23 12:12:55 +02:00
parent 13933c6b6f
commit 0600ff0e66
-1
View File
@@ -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,