Mark dropped pages unevictable in fsimpl/gofer.dentry.destroyLocked.

PiperOrigin-RevId: 325531657
This commit is contained in:
Jamie Liu
2020-08-07 16:35:20 -07:00
committed by gVisor bot
parent 80c80a1410
commit 0b7cd1e751
+5 -2
View File
@@ -1264,8 +1264,11 @@ func (d *dentry) destroyLocked(ctx context.Context) {
}
}
// Discard cached data.
d.cache.DropAll(mf)
d.dirty.RemoveAll()
if !d.cache.IsEmpty() {
mf.MarkAllUnevictable(d)
d.cache.DropAll(mf)
d.dirty.RemoveAll()
}
d.dataMu.Unlock()
// Clunk open fids and close open host FDs.
if !d.readFile.isNil() {