code: func (s *storage) closePack() error {
  	var err error
  	if s.writer != nil {
  		err = s.writer.Close()
  		openFdsVar.Add(s.root, -1)
  		s.writer = nil
  	}
  	if s.writeLock != nil {
  		lerr := s.writeLock.Close()
  		if err == nil {
  			err = lerr
  		}
  		s.writeLock = nil
  	}
  	return err
  }
docs: // closePack opens any pack file currently open for writing.