]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journal: return & log in one statement
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 30 May 2022 14:51:48 +0000 (16:51 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 30 May 2022 16:12:58 +0000 (18:12 +0200)
src/journal/managed-journal-file.c

index 52aee7be981aab5b7a853884270286d5501cf442..5c34d14ddcb04756aba5f29fa8d7b91a7a214a86 100644 (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);
         }