diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-06-27 21:31:55 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-06-27 21:31:55 +0000 |
commit | 085d6fdce34f34d82de5f71d031407c3da253b23 (patch) | |
tree | d10fa274dfd60d258a37c8ba950e6d7f29b4baf3 /pkg/sentry/fs/mount_overlay.go | |
parent | ea09397196f66a2f13e315017372c5b38c3b1edb (diff) | |
parent | 085a907565921e84f59dfeb51da49af2d7c36c40 (diff) |
Merge 085a9075 (automated)
Diffstat (limited to 'pkg/sentry/fs/mount_overlay.go')
-rw-r--r-- | pkg/sentry/fs/mount_overlay.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkg/sentry/fs/mount_overlay.go b/pkg/sentry/fs/mount_overlay.go index bc0ce7adc..4fcdd6c01 100644 --- a/pkg/sentry/fs/mount_overlay.go +++ b/pkg/sentry/fs/mount_overlay.go @@ -81,6 +81,17 @@ func (o *overlayMountSourceOperations) Keep(dirent *Dirent) bool { return o.upper.Keep(dirent) } +// CacheReaddir implements MountSourceOperations.CacheReaddir for an overlay by +// performing the logical AND of the upper and lower filesystems' CacheReaddir +// methods. +// +// N.B. This is fs-global instead of inode-specific because it must always +// return the same value. If it was inode-specific, we couldn't guarantee that +// property across copy up. +func (o *overlayMountSourceOperations) CacheReaddir() bool { + return o.lower.CacheReaddir() && o.upper.CacheReaddir() +} + // ResetInodeMappings propagates the call to both upper and lower MountSource. func (o *overlayMountSourceOperations) ResetInodeMappings() { o.upper.ResetInodeMappings() |