HomeFreeBSD

Factor out the code that does a VOP_SETATTR(size) from vn_truncate().

Description

Factor out the code that does a VOP_SETATTR(size) from vn_truncate().

This patch factors the code in vn_truncate() that does the actual
VOP_SETATTR() of size into a separate function called vn_truncate_locked().
This will allow the NFS server and the patch that adds a
copy_file_range(2) syscall to call this function instead of duplicating
the code and carrying over changes, such as the recent r347151.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D20808