From: Yu Watanabe Date: Mon, 25 Sep 2023 01:44:50 +0000 (+0900) Subject: sd-journal: drop redundant re-read of entry array object X-Git-Tag: v255-rc1~374^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eb6ba873447e378d40a13dfda764d2772ce36389;p=thirdparty%2Fsystemd.git sd-journal: drop redundant re-read of entry array object This effectively reverts d9b61db922404a216de018cc5ddff9b69bcaf1db. In the do-while loop, we do not read any other entry array object, hence the current object is always in the mmap cache and not necessary to re-read it. --- diff --git a/src/libsystemd/sd-journal/journal-file.c b/src/libsystemd/sd-journal/journal-file.c index 5d3f85e4cc3..31d4db97c0c 100644 --- a/src/libsystemd/sd-journal/journal-file.c +++ b/src/libsystemd/sd-journal/journal-file.c @@ -2840,10 +2840,6 @@ static int generic_array_get( * disk properly, let's see if the next one might work for us instead. */ log_debug_errno(r, "Entry item %" PRIu64 " is bad, skipping over it.", i); - r = journal_file_move_to_object(f, OBJECT_ENTRY_ARRAY, a, &o); - if (r < 0) - return r; - } while (bump_array_index(&i, direction, k) > 0); r = bump_entry_array(f, o, a, first, direction, &a);