anitazha / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone

Blame SOURCES/0696-journald-fixed-assertion-failure-when-system-journal.patch

Pablo Greco 48fc63
From 7b82ce4a8457639d225449f3d345138c9f4f5ad9 Mon Sep 17 00:00:00 2001
Pablo Greco 48fc63
From: =?UTF-8?q?Renaud=20M=C3=A9trich?=
Pablo Greco 48fc63
 <1163635+rmetrich@users.noreply.github.com>
Pablo Greco 48fc63
Date: Mon, 3 Sep 2018 05:42:39 +0200
Pablo Greco 48fc63
Subject: [PATCH] journald: fixed assertion failure when system journal
Pablo Greco 48fc63
 rotation fails (#9893)
Pablo Greco 48fc63
Pablo Greco 48fc63
(cherry picked from commit fd790d6f09b10a87b007b71403cb018f18ff91c9)
Pablo Greco 48fc63
Resolves: #1619543
Pablo Greco 48fc63
---
Pablo Greco 48fc63
 src/journal/journald-server.c | 3 ++-
Pablo Greco 48fc63
 1 file changed, 2 insertions(+), 1 deletion(-)
Pablo Greco 48fc63
Pablo Greco 48fc63
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
Pablo Greco 48fc63
index 88d8f3e41d..88cf0b2d53 100644
Pablo Greco 48fc63
--- a/src/journal/journald-server.c
Pablo Greco 48fc63
+++ b/src/journal/journald-server.c
Pablo Greco 48fc63
@@ -1180,7 +1180,8 @@ int server_flush_to_var(Server *s, bool require_flag_file) {
Pablo Greco 48fc63
         }
Pablo Greco 48fc63
 
Pablo Greco 48fc63
 finish:
Pablo Greco 48fc63
-        journal_file_post_change(s->system_journal);
Pablo Greco 48fc63
+        if (s->system_journal)
Pablo Greco 48fc63
+                journal_file_post_change(s->system_journal);
Pablo Greco 48fc63
 
Pablo Greco 48fc63
         journal_file_close(s->runtime_journal);
Pablo Greco 48fc63
         s->runtime_journal = NULL;