freebsd-skq/sys/ufs
Konstantin Belousov 74a3652f83 ufs_direnter: move directory truncation to ffs_vput_pair().
VOP_VPUT_PAIR() provides the hook to do the truncation right before
unlock, which is required since truncation might need to fsync(), which
itself might unlock the directory vnode.

Set new flag IN_ENDOFF which indicates that i_endoff is valid and should
be checked against inode size. Excessive size is chomped, but this
operation is advisory and failure to truncate should not result in the
failure of the main VOP.

Reviewed by:	chs, mckusick
Tested by:	pho
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2021-02-12 03:02:21 +02:00
..
ffs ufs_direnter: move directory truncation to ffs_vput_pair(). 2021-02-12 03:02:21 +02:00
ufs ufs_direnter: move directory truncation to ffs_vput_pair(). 2021-02-12 03:02:21 +02:00