kernel - TMPFS - Bug fixing pass - directory hierarchy
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 13 Feb 2010 06:16:35 +0000 (22:16 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 13 Feb 2010 06:16:35 +0000 (22:16 -0800)
commit0786baf1fc52cfb8dfbb4703b677a498aa96bfe0
tree1a364f7d46186235db901cc70ac7eda2e4c23641
parentdd00f6f349508aeb03c8d223eb2f59c748a666c9
kernel - TMPFS - Bug fixing pass - directory hierarchy

* Adjust parent linkages for directories.  The root node's parent
  linkage is now set to NULL instead of a self-reference.  The
  root node is given just one extra link count to hold it instead
  of two.

* List operations on tmpfs_mount->tn_entries are now protected
  by TMPFS_LOCK.

* Hold a node locked when calling tmpfs_free_node().  The function
  will eat the lock.

* Do a better job cleaning up dirent and node structures when freeing.
  The ctor function is only called on backing store allocations, not
  on frontend objcache allocations.

  Misinitialized previously freed structures created some amount of
  havoc.

* Remove unnecessary critical sections.

* Refactor the umount code to properly clean up all nodes, and in
  the correct order.  Remove tmpfs_free_node() hacks that tried
  to allow out-of-order removal.
sys/vfs/tmpfs/tmpfs.h
sys/vfs/tmpfs/tmpfs_subr.c
sys/vfs/tmpfs/tmpfs_vfsops.c
sys/vfs/tmpfs/tmpfs_vnops.c