journal: hash_ops related cleanups (#37115)

This commit is contained in:
Yu Watanabe
2025-04-15 22:32:15 +09:00
committed by GitHub
10 changed files with 56 additions and 49 deletions
+6 -1
View File
@@ -448,7 +448,7 @@ int journal_file_rotate(
if (r < 0)
return r;
set_clear_with_destructor(deferred_closes, journal_file_offline_close);
set_clear(deferred_closes);
r = journal_file_open(
/* fd= */ -EBADF,
@@ -532,3 +532,8 @@ int journal_file_open_reliably(
return journal_file_open(-EBADF, fname, open_flags, file_flags, mode, compress_threshold_bytes, metrics,
mmap_cache, /* template = */ old_file, ret);
}
DEFINE_HASH_OPS_WITH_VALUE_DESTRUCTOR(
journal_file_hash_ops_offline_close,
void, trivial_hash_func, trivial_compare_func,
JournalFile, journal_file_offline_close);
+2
View File
@@ -26,3 +26,5 @@ int journal_file_rotate(
JournalFileFlags file_flags,
uint64_t compress_threshold_bytes,
Set *deferred_closes);
extern const struct hash_ops journal_file_hash_ops_offline_close;