code: public final void unlockFromUpgrade(L locker) {
          int upgradeCount = mUpgradeCount - 1;
          if (upgradeCount < 0) {
              throw new IllegalMonitorStateException("Too many upgrade locks released");
          }
          if (upgradeCount == 0 && mWriteCount > 0) {
              // Don't release last upgrade lock and switch write lock to
              // automatic upgrade mode.
              clearUpgradeLock(mState);
              return;
          }
          mUpgradeCount = upgradeCount;
          if (upgradeCount > 0) {
              return;
          }
  
          mOwner = null;
  
          // keep looping on CAS failure if reader mucked with state
          while (!clearUpgradeLock(mState)) {}
  
          Node h = mUHead;
          if (h != null && h.mWaitStatus != 0) {
              unparkUpgradeSuccessor(h);
          }
      }
docs: Release a previously acquired upgrade lock.