 - If we vrele() a dvp while the child is locked we can potentially deadlock    when vrele() acquires the directory lock in the wrong order.  Fix this    via the following changes:  - Keep the directory locked after VOP_LOOKUP() until we've determined    what we're going to do with the child.  This allows us to remove the    complicated post LOOKUP code which determins whether we should lock or    unlock the parent.  This means we may have to vput() in the appropriate    cases later, rather than doing an unsafe vrele.  - in NDFREE() keep two flags to indicate whether we need to unlock vp or    dvp.  This allows us to vput rather than vrele in the appropriate    cases without rechecking the flags.  Move the code to handle dvp after    we handle vp.  - Remove some dead code from namei() that was the result of changes to    VFS_LOCK_GIANT().
 - If we vrele() a dvp while the child is locked we can potentially deadlock
   when vrele() acquires the directory lock in the wrong order.  Fix this
   via the following changes:
 - Keep the directory locked after VOP_LOOKUP() until we've determined
   what we're going to do with the child.  This allows us to remove the
   complicated post LOOKUP code which determins whether we should lock or
   unlock the parent.  This means we may have to vput() in the appropriate
   cases later, rather than doing an unsafe vrele.
 - in NDFREE() keep two flags to indicate whether we need to unlock vp or
   dvp.  This allows us to vput rather than vrele in the appropriate
   cases without rechecking the flags.  Move the code to handle dvp after
   we handle vp.
 - Remove some dead code from namei() that was the result of changes to
   VFS_LOCK_GIANT().

Sponsored by:	Isilon Systems, Inc.

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase