VFS accounting: check if nullfs mp* really exist
authorFrancois Tigeot <ftigeot@wolfpond.org>
Fri, 17 Feb 2012 22:58:58 +0000 (23:58 +0100)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Sat, 18 Feb 2012 09:09:54 +0000 (10:09 +0100)
commitcf7ad7d148d126095d2261798f8f289a0d170959
tree052adfd8c175e0f21ec27e02632a0a0f314510e3
parentd8eb409351a158c123f2d38a1b3b0b90d6509f53
VFS accounting: check if nullfs mp* really exist

* Nullfs are a clever hack, they forget their mp after mount and let the
  non-nullfs underlying mount point do all the work

* Nevertheless, we need to get the real struct mount associated to a mount
  point to count the space used by PFSes. We cache it in the vnode.

* But since the vnode we use really belongs to the lowest underlying
  mount point, the upper-level mp may already have been freed.

* We need to first check if it still valid; a new function,
  mountlist_exists() now exists for that purpose.

* Should fix issue #2266
sys/kern/vfs_mount.c
sys/kern/vfs_vopops.c
sys/sys/mount.h