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 Oct 9 2020, 8:31 PM
Parents
rG7e8bd70cff01: Don't invoke semunload() if seminit() fails during MOD_LOAD.
Branches
Unknown
Tags
Unknown

Event Timeline