diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-09-27 19:42:00 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-10-06 02:55:04 +0200 |
commit | 20c45e578488c1d67f44eac45c168c23331fa19f (patch) | |
tree | 1cde4af7dde276b1eacab5d4b584d9c5823a9698 /src/libsystemd/sd-journal/journal-file.c | |
parent | sd-journal: rewrite conditions for test result and direction (diff) | |
download | systemd-20c45e578488c1d67f44eac45c168c23331fa19f.tar.xz systemd-20c45e578488c1d67f44eac45c168c23331fa19f.zip |
sd-journal: drop unnecessary re-read of data object
Follow-up for ec50313d4e329de276240883d86d05168a4cf09f.
The function generic_array_bisect_plus_one() does not read any new data
objects, so the data object is still valid, and not necessary to re-read it.
Diffstat (limited to '')
-rw-r--r-- | src/libsystemd/sd-journal/journal-file.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/libsystemd/sd-journal/journal-file.c b/src/libsystemd/sd-journal/journal-file.c index af946e6cad..05bdac9ed4 100644 --- a/src/libsystemd/sd-journal/journal-file.c +++ b/src/libsystemd/sd-journal/journal-file.c @@ -3541,7 +3541,7 @@ int journal_file_move_to_entry_by_monotonic_for_data( Object **ret_object, uint64_t *ret_offset) { - uint64_t b, z, entry_offset, entry_array_offset, n_entries; + uint64_t z, entry_offset, entry_array_offset, n_entries; Object *o; int r; @@ -3555,7 +3555,7 @@ int journal_file_move_to_entry_by_monotonic_for_data( n_entries = le64toh(READ_NOW(d->data.n_entries)); /* First, seek by time */ - r = find_data_object_by_boot_id(f, boot_id, &o, &b); + r = find_data_object_by_boot_id(f, boot_id, &o, NULL); if (r <= 0) return r; @@ -3572,11 +3572,6 @@ int journal_file_move_to_entry_by_monotonic_for_data( /* And now, continue seeking until we find an entry that * exists in both bisection arrays */ - - r = journal_file_move_to_object(f, OBJECT_DATA, b, &o); - if (r < 0) - return r; - for (;;) { uint64_t p, q; |