From c0bc1e897178da521e74acb270843805f5906adf Mon Sep 17 00:00:00 2001 From: Nick Rosbrook Date: Thu, 18 Apr 2024 12:01:42 -0400 Subject: [PATCH] copy: ignore -EOPNOTSUPP from copy_file_range() According to copy_file_range (2), errno will be set to EOPNOTSUPP when the file system does not support copy_file_range(). Since there is already fallback logic in place here for other kinds of errors, add -EOPNOTSUPP to the list of ignored errors. --- src/shared/copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/copy.c b/src/shared/copy.c index 2374fa3b62f..8389774db75 100644 --- a/src/shared/copy.c +++ b/src/shared/copy.c @@ -335,7 +335,7 @@ int copy_bytes_full( if (try_cfr) { n = try_copy_file_range(fdf, NULL, fdt, NULL, m, 0u); if (n < 0) { - if (!IN_SET(n, -EINVAL, -ENOSYS, -EXDEV, -EBADF)) + if (!IN_SET(n, -EINVAL, -ENOSYS, -EXDEV, -EBADF, -EOPNOTSUPP)) return n; try_cfr = false; -- 2.47.3