diff --git a/src/journal/managed-journal-file.c b/src/journal/managed-journal-file.c index 657cf5ebbf6..03b1d8275e6 100644 --- a/src/journal/managed-journal-file.c +++ b/src/journal/managed-journal-file.c @@ -210,7 +210,10 @@ static void managed_journal_file_set_offline_internal(ManagedJournalFile *f) { log_debug_errno(r, "Failed to re-enable copy-on-write for %s: %m, rewriting file", f->file->path); - r = copy_file_atomic(FORMAT_PROC_FD_PATH(f->file->fd), f->file->path, f->file->mode, 0, FS_NOCOW_FL, COPY_REPLACE | COPY_FSYNC | COPY_HOLES); + r = copy_file_atomic(FORMAT_PROC_FD_PATH(f->file->fd), f->file->path, f->file->mode, + 0, + FS_NOCOW_FL, + COPY_REPLACE | COPY_FSYNC | COPY_HOLES | COPY_ALL_XATTRS); if (r < 0) { log_debug_errno(r, "Failed to rewrite %s: %m", f->file->path); continue; diff --git a/src/shared/copy.c b/src/shared/copy.c index cc76465fb1c..0043c4ff72a 100644 --- a/src/shared/copy.c +++ b/src/shared/copy.c @@ -1488,7 +1488,7 @@ int copy_xattr(int fdf, int fdt, CopyFlags copy_flags) { NULSTR_FOREACH(p, names) { _cleanup_free_ char *value = NULL; - if (!(copy_flags & COPY_ALL_XATTRS) && !startswith(p, "user.")) + if (!FLAGS_SET(copy_flags, COPY_ALL_XATTRS) && !startswith(p, "user.")) continue; r = fgetxattr_malloc(fdf, p, &value);