code: public final void unlockFromWrite(L locker) {
          int writeCount = mWriteCount - 1;
          if (writeCount < 0) {
              throw new IllegalMonitorStateException("Too many write locks released");
          }
          mWriteCount = writeCount;
          if (writeCount > 0) {
              return;
          }
  
          // copy original state to check if upgrade lock was automatic
          final int state = mState;
  
          // make sure upgrade lock is still held after releasing write lock
          mState = LOCK_STATE_UPGRADE;
  
          Node h = mRWHead;
          if (h != null && h.mWaitStatus != 0) {
              unparkReadWriteSuccessor(h);
          }
  
          if (state == LOCK_STATE_WRITE) {
              // upgrade owner was automatically set, so automatically clear it
              unlockFromUpgrade(locker);
          }
      }
docs: Release a previously acquired write lock.