code: func (fs *Goofys) insertInodeFromDirEntry(parent *Inode, entry *DirHandleEntry) (inode *Inode) {
  	parent.mu.Lock()
  	defer parent.mu.Unlock()
  
  	if entry.Type == fuseutil.DT_Directory {
  		// it's possible that both "a" and "a/b" exist, in
  		// which case we need to turn this file into a
  		// directory
  		inode = parent.findChildUnlocked(*entry.Name, false)
  		if inode != nil {
  			parent.removeChildUnlocked(inode)
  		}
  	}
  
  	inode = parent.findChildUnlocked(*entry.Name, entry.Type == fuseutil.DT_Directory)
  	if inode == nil {
  		path := parent.getChildName(*entry.Name)
  		inode = NewInode(fs, parent, entry.Name, &path)
  		if entry.Type == fuseutil.DT_Directory {
  			inode.ToDir()
  		} else {
  			inode.Attributes = *entry.Attributes
  		}
  		if entry.ETag != nil {
  			inode.s3Metadata["etag"] = []byte(*entry.ETag)
  		}
  		if entry.StorageClass != nil {
  			inode.s3Metadata["storage-class"] = []byte(*entry.StorageClass)
  		}
  		// these are fake dir entries, we will realize the refcnt when
  		// lookup is done
  		inode.refcnt = 0
  
  		fs.mu.Lock()
  		defer fs.mu.Unlock()
  
  		fs.insertInode(parent, inode)
  	} else {
  		inode.mu.Lock()
  		defer inode.mu.Unlock()
  
  		if entry.ETag != nil {
  			inode.s3Metadata["etag"] = []byte(*entry.ETag)
  		}
  		if entry.StorageClass != nil {
  			inode.s3Metadata["storage-class"] = []byte(*entry.StorageClass)
  		}
  		inode.KnownSize = &entry.Attributes.Size
  		inode.Attributes.Mtime = entry.Attributes.Mtime
  		inode.AttrTime = time.Now()
  	}
  	return
  }
docs: // LOCKS_EXCLUDED(fs.mu)