code: private INode removeChild(INode[] pathComponents, int endPos) {
      INode removedNode = pathComponents[endPos];
      int startPos = removedNode.getStartPosForQuoteUpdate();
      removedNode =
        ((INodeDirectory)pathComponents[endPos-1]).removeChild(pathComponents[endPos]);
      if (removedNode != null) {
        INode.DirCounts counts = new INode.DirCounts();
        removedNode.spaceConsumedInTree(counts);
        updateCountNoQuotaCheck(pathComponents, startPos, endPos,
                    -counts.getNsCount(), -counts.getDsCount());
      }
      return removedNode;
    }
docs: Remove an inode at index pos from the namespace.
  Its ancestors are stored at [0, pos-1].
  Count of each ancestor with quota is also updated.
  Return the removed node; null if the removal fails.