diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/copy.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/copy.c b/src/copy.c index 9b0e139c6..c45224c8a 100644 --- a/src/copy.c +++ b/src/copy.c @@ -700,9 +700,10 @@ copy_reg (char const *src_name, char const *dst_name, } last_write_made_hole = false; - /* A short read on a regular file means EOF. */ - if (n_read != buf_size && S_ISREG (src_open_sb.st_mode)) - break; + /* It is tempting to return early here upon a short read from a + regular file. That would save the final read syscall for each + file. Unfortunately that doesn't work for certain files in + /proc with linux kernels from at least 2.6.9 .. 2.6.29. */ } } |