I'm not sure cp can robustly clean up in this situation?
Thanks for pointing me to those old discussions. As I understand it, the
worry is that FICLONE will only partly succeed, causing the destination
file to contain some (but not all) the input data, and then if we remove
the output file we'll lose the newly-made partial clone. I don't know
whether FICLONE can do that, but it sounds like a reasonable worry.
If that understanding is correct, then the attached further patch should
suffice, so I boldly installed it.