journal: return & log in one statement

This commit is contained in:
Frantisek Sumsal committed 2022-05-30 18:12:58 +02:00
1 parent 4c7f7f4b22
commit 81aa8d4130
1 file changed
+3 -4
+3 -4
View File
@@ -93,10 +93,9 @@ static int managed_journal_file_entry_array_punch_hole(JournalFile *f, uint64_t
}
if (fallocate(f->fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, offset, sz) < 0) {
if (ERRNO_IS_NOT_SUPPORTED(errno)) {
log_debug("Hole punching not supported by backing file system, skipping.");
return -EOPNOTSUPP; /* Make recognizable */
}
if (ERRNO_IS_NOT_SUPPORTED(errno))
return log_debug_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), /* Make recognizable */
"Hole punching not supported by backing file system, skipping.");
return log_debug_errno(errno, "Failed to punch hole in entry array of %s: %m", f->path);
}