code: void closeFile(String path, INodeFile file) throws IOException {
      waitForReady();
      writeLock();
      try {
        long now = FSNamesystem.now();
        // file is closed
        file.setModificationTimeForce(now);
        fsImage.getEditLog().logCloseFile(path, file);
        if (NameNode.stateChangeLog.isDebugEnabled()) {
          NameNode.stateChangeLog.debug("DIR* FSDirectory.closeFile: "
                                      +path+" with "+ file.getBlocks().length
                                      +" blocks is persisted to the file system");
        }
      } finally {
        writeUnlock();
      }
    }
docs: Close file.