fs: Don't bother saving negative dirents.
PiperOrigin-RevId: 210616454 Change-Id: I3f536e2b4d603e540cdd9a67c61b8ec3351f4ac3
This commit is contained in:
parent
515d9bf43b
commit
3b11769c77
|
@ -45,7 +45,13 @@ func (d *Dirent) saveChildren() map[string]*Dirent {
|
|||
if rc := w.Get(); rc != nil {
|
||||
// Drop the reference count obtain in w.Get()
|
||||
rc.DecRef()
|
||||
c[name] = rc.(*Dirent)
|
||||
|
||||
cd := rc.(*Dirent)
|
||||
if cd.IsNegative() {
|
||||
// Don't bother saving negative Dirents.
|
||||
continue
|
||||
}
|
||||
c[name] = cd
|
||||
}
|
||||
}
|
||||
return c
|
||||
|
|
Loading…
Reference in New Issue