summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/journal/journal-file.c5
-rw-r--r--src/journal/journald.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
index 7f5d7c27b2..a784a3391b 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1740,6 +1740,11 @@ int journal_file_open(
f->writable = (flags & O_ACCMODE) != O_RDONLY;
f->prot = prot_from_flags(flags);
+ if (template) {
+ f->metrics = template->metrics;
+ f->compress = template->compress;
+ }
+
f->path = strdup(fname);
if (!f->path) {
r = -ENOMEM;
diff --git a/src/journal/journald.c b/src/journal/journald.c
index e9ac897de7..fb298be758 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -308,8 +308,6 @@ static JournalFile* find_journal(Server *s, uid_t uid) {
return s->system_journal;
server_fix_perms(s, f, uid);
- f->metrics = s->system_metrics;
- f->compress = s->compress;
r = hashmap_put(s->user_journals, UINT32_TO_PTR(uid), f);
if (r < 0) {