]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vfs: fix a panic when truncating comming from copy_file_range
authorMateusz Guzik <mjg@FreeBSD.org>
Fri, 9 Oct 2020 20:31:42 +0000 (20:31 +0000)
committerMateusz Guzik <mjg@FreeBSD.org>
Fri, 9 Oct 2020 20:31:42 +0000 (20:31 +0000)
commitdeb1339f3f8c9325fffc551e622bf835a08dcd8c
treebfb17aeb31a2bb886d59a5a081b776951dabe885
parent7e8bd70cff019c5aa0bf1a69e3e1fa00985c358d
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