code: func (fm *filesManager) closeUnusedFiles(idToSkip fileID) {
  	for _, file := range fm.files {
  		if file.id == idToSkip {
  			continue
  		}
  		if atomic.CompareAndSwapInt32(&file.state, fileOpened, fileClosing) {
  			fm.doClose(file)
  			if fm.openedFDs < fm.limit {
  				break
  			}
  		}
  	}
  }
docs: // closeUnusedFiles cloes files that are opened and not currently in-use.
  // Since the number of opened files is a soft limit, and if this function
  // is unable to close any file, the caller will still attempt to create/open
  // the requested file. If the system's file descriptor limit is reached,
  // opening the file will fail and that error will be returned to the caller.
  // Lock is required on entry.