Test return from write before calling commit

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
REWORD Add cache_inode_get_protected MOVE AHAED OF Use pin reference instead of LRU reference on export root and junction cache inodes

This routine enables taking a reference on a cache inode given a pointer
to one (that is guaranteed to not go bad based on the lock passed to
cache_inode_get_protected). The reference is taken by copying the
entry's key under the lock provided, and then doing a regular hash look
up using that key.

The passed lock MUST guarantee the inode can not proceed far enough
along being cleaned to have it's key released (nor the cache_entry_t
memory either).

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
SQUASH Use pin reference instead of LRU reference on export root and junction cache inodes

Add text describing use of cache_inode_get_protected

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Add cache_inode_unexport to clean up cache inodes associated with unexport

When an export is unexported, any cache inodes that are exclusively
associated with that export must be cleaned up since they might become
otherwise unreachable.

Any cache inode that is still associated with another export will be
left untouched (other than removing it from the list of cache inodes
associated with the export being unexported).

cache_inode_get_protected is used to get a reference to each cache inode
in the list. This guarantees that if unexport is racing with a
cache_inode_kill_entry, that we don't work on a half-killed entry.

cache_inode_lru_cleanup_try_push is used to try and push an entry to
cleanup. This protects against a race where another thread suddenly
references this inode via some other export.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
SAVE 2013-12-16 AAA

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>