code: void leaveSafeMode(boolean checkForUpgrades) throws SafeModeException {
      writeLock();
      try {
        if (!isInSafeMode()) {
          NameNode.stateChangeLog.info("STATE* Safe mode is already OFF.");
          return;
        }
        if (getDistributedUpgradeState()) {
          throw new SafeModeException("Distributed upgrade is in progress",
            safeMode);
        }
        safeMode.leave(checkForUpgrades);
        safeMode = null;
      } finally {
        writeUnlock();
      }
    }
docs: Leave safe mode.
  
  @throws IOException