summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/journal/sd-journal.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index c06255e273..4c502978de 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -2597,13 +2597,12 @@ _public_ int sd_journal_wait(sd_journal *j, uint64_t timeout_usec) {
Get rid of the deleted files now so they don't stay around indefinitely. */
ORDERED_HASHMAP_FOREACH(f, j->files, i) {
r = journal_file_fstat(f);
- if (r < 0) {
+ if (r == -EIDRM)
+ remove_file_real(j, f);
+ else if (r < 0) {
log_debug_errno(r,"Failed to fstat() journal file '%s' : %m", f->path);
continue;
}
-
- if (f->last_stat.st_nlink <= 0)
- remove_file_real(j, f);
}
/* The journal might have changed since the context