From 877f5d0f1fdfc9bb8d19ff4cfcc8235c1f2130f1 Mon Sep 17 00:00:00 2001 From: Sargun Dhillon Date: Tue, 21 Nov 2017 19:11:48 -0800 Subject: [PATCH] Fix bug, where copy_file_range was still calling legacy copy There was a small issue here, where it copied the data using traditional mechanisms, even when copy_file_range was successful. Signed-off-by: Sargun Dhillon Upstream-commit: 0eac562281782257e6f69d58bcbc13fa889f1759 Component: engine --- components/engine/daemon/graphdriver/copy/copy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/daemon/graphdriver/copy/copy.go b/components/engine/daemon/graphdriver/copy/copy.go index bb658c43ef..3046089512 100644 --- a/components/engine/daemon/graphdriver/copy/copy.go +++ b/components/engine/daemon/graphdriver/copy/copy.go @@ -65,7 +65,7 @@ func copyRegular(srcPath, dstPath string, fileinfo os.FileInfo, copyWithFileRang // as the ioctl may not have been available (therefore EINVAL) if err == unix.EXDEV || err == unix.ENOSYS { *copyWithFileRange = false - } else if err != nil { + } else { return err } }