From: Daan De Meyer Date: Wed, 12 Mar 2025 16:07:55 +0000 (+0100) Subject: copy: Bubble up ENOSPC immediately in fd_copy_directory() X-Git-Tag: v258-rc1~1092 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3ed45e7fd3b09e2bee95908efbf377f5cad15886;p=thirdparty%2Fsystemd.git copy: Bubble up ENOSPC immediately in fd_copy_directory() It doesn't really make sense to continue once we start getting ENOSPC. --- diff --git a/src/shared/copy.c b/src/shared/copy.c index f9215da8054..09110bb0bd2 100644 --- a/src/shared/copy.c +++ b/src/shared/copy.c @@ -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;