VFS accounting: handle file truncation on open(2)
authorFrancois Tigeot <ftigeot@wolfpond.org>
Thu, 22 Mar 2012 16:51:47 +0000 (17:51 +0100)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Thu, 22 Mar 2012 17:50:10 +0000 (18:50 +0100)
commit18cd8808a42f4ca63dec5ead58586c05a05a909b
tree17a0e8153ad93d3373d1ee325895f76775341609
parent1a17d37b27b359833e26d74e5f6df47b36c25a3b
VFS accounting: handle file truncation on open(2)

* Files succesfully opened with O_TRUNC are truncated to zero length.
  This case was not previously handled, leading to a growing drift
  between VFS counters and reality.

* Fix a buildworld issue caused by the last VFS accounting commit
sys/kern/vfs_vnops.c
sys/sys/vfs_quota.h