1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-19 22:50:17 +03:00

copy: Bubble up ENOSPC immediately in fd_copy_directory()

It doesn't really make sense to continue once we start getting ENOSPC.
This commit is contained in:
Daan De Meyer 2025-03-12 17:07:55 +01:00 committed by Yu Watanabe
parent 520372b7ee
commit 3ed45e7fd3

View File

@ -1159,7 +1159,7 @@ static int fd_copy_directory(
denylist, subvolumes, hardlink_context, child_display_path, progress_path,
progress_bytes, userdata);
if (q == -EINTR) /* Propagate SIGINT/SIGTERM up instantly */
if (IN_SET(q, -EINTR, -ENOSPC)) /* Propagate SIGINT/SIGTERM and ENOSPC up instantly */
return q;
if (q == -EEXIST && (copy_flags & COPY_MERGE))
q = 0;