kernel - Fix mount refs interactions and umount races
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 23 Mar 2012 04:37:25 +0000 (21:37 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 29 Mar 2012 23:06:15 +0000 (16:06 -0700)
commit412f07cde12df9416f3ce8f67b832d9d382375c4
tree6e25f01ecc23e71d33cc1819a82935a03447d362
parent5ec6adbc2e9fbe864a4eb1f2756d85ecb7880b94
kernel - Fix mount refs interactions and umount races

* It is possible for a umount to race other operations on active mount
  point, causing one or the other to deadlock.

* vfs_busy()/vfs_unbusy() now incr/decr mp->mnt_refs.

* cache_findmount() now increments mp->mnt_refs, and add a new API
  function cache_dropmount() which decrements it.
sys/kern/vfs_cache.c
sys/kern/vfs_mount.c
sys/kern/vfs_nlookup.c
sys/kern/vfs_syscalls.c
sys/sys/namecache.h