public RWLockResource lockInode(InodeView inode, LockMode mode, boolean useTryLock) {
    return mInodeLocks.get(inode.getId(), mode, useTryLock);
  }
@Test(timeout = 10000)
  public void lockInode() throws Exception {
    inodeLockTest(LockMode.WRITE, LockMode.READ, true);
    inodeLockTest(LockMode.READ, LockMode.WRITE, true);
    inodeLockTest(LockMode.WRITE, LockMode.WRITE, true);
    inodeLockTest(LockMode.READ, LockMode.READ, false);
  }