]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vfs: fix a panic when truncating comming from copy_file_range
authormjg <mjg@FreeBSD.org>
Fri, 9 Oct 2020 20:31:42 +0000 (20:31 +0000)
committermjg <mjg@FreeBSD.org>
Fri, 9 Oct 2020 20:31:42 +0000 (20:31 +0000)
commitec44b813f3b8528055c7ea88bb68779a5e2a5746
treebfb17aeb31a2bb886d59a5a081b776951dabe885
parentd1fe145b59a4302802edf3bbdb6531054defe80c
vfs: fix a panic when truncating comming from copy_file_range

Truncating requires an exclusive lock, but it was not taken if the
filesystem indicates support for shared writes. This only concerns
ZFS.

In particular fixes cp of files which have trailing holes.

Reported by: bdrewery
sys/kern/vfs_vnops.c