kernel - Fix various memory & swap leaks in tmpfs
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 15 Sep 2011 06:25:03 +0000 (23:25 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 15 Sep 2011 06:25:03 +0000 (23:25 -0700)
commita1fa5d8d095e6aa52c4a9ac5d2ab52b03fee54b9
tree32b94c2cd31fe25c935f0c866dc78f443edbc206
parent35b2edcbf25d64f44112e34c57c74848aa1b1734
kernel - Fix various memory & swap leaks in tmpfs

* tmpfs was using a vref() instead of a vget() (cache_vget() to be precise)
  which does not necessarily reactivate an inactive vnode.  This can cause
  the vnode to languish in the vnode cache even when the underlying file
  has been removed and no longer has any open() descriptors.

* tmpfs_nrmdir(), tmpfs_nremove(), and tmpfs_nrename() (for target replacement
  renames) was effected.

Reported-by: sephe and others, tested by sephe, dillon
sys/vfs/tmpfs/tmpfs_vnops.c