Merge pull request #31311 from yuwata/journal-user-corruption

journal: fix user journal corruption on rotation
This commit is contained in:
Luca Boccassi
2024-02-16 12:07:50 +00:00
committed by GitHub
10 changed files with 156 additions and 8 deletions
+3 -2
View File
@@ -734,8 +734,9 @@ int journal_file_fstat(JournalFile *f) {
return r;
/* Refuse appending to files that are already deleted */
if (f->last_stat.st_nlink <= 0)
return -EIDRM;
r = stat_verify_linked(&f->last_stat);
if (r < 0)
return r;
return 0;
}