HomeFreeBSD

vfs: fix a panic when truncating comming from copy_file_range

Description

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

Details

Provenance
mjgAuthored on
Parents
rS366586: Change job handling to use the same construct I moved to later.
Branches
Unknown
Tags
Unknown