diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2018-07-19 14:56:42 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-07-19 14:57:52 -0700 |
commit | be431d0934b8d33dcb1909527e0f9ed7eb504b6f (patch) | |
tree | 4071eb98e3ecdfa6abd77552c7e5426469027cd8 /pkg/sentry/fs/mount_overlay.go | |
parent | ea371031968095209793ea39007cfdf5a9d66d10 (diff) |
fs: Pass context to Revalidate() function.
The current revalidation logic is very simple and does not do much
introspection of the dirent being revalidated (other than looking at the type
of file).
Fancier revalidation logic is coming soon, and we need to be able to look at
the cached and uncached attributes of a given dirent, and we need a context to
perform some of these operations.
PiperOrigin-RevId: 205307351
Change-Id: If17ea1c631d8f9489c0e05a263e23d7a8a3bf159
Diffstat (limited to 'pkg/sentry/fs/mount_overlay.go')
-rw-r--r-- | pkg/sentry/fs/mount_overlay.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/fs/mount_overlay.go b/pkg/sentry/fs/mount_overlay.go index 343202400..1be81e3a1 100644 --- a/pkg/sentry/fs/mount_overlay.go +++ b/pkg/sentry/fs/mount_overlay.go @@ -34,8 +34,8 @@ func newOverlayMountSource(upper, lower *MountSource, flags MountSourceFlags) *M // Revalidate panics if the upper or lower MountSource require that dirent be // revalidated. Otherwise always returns false. -func (o *overlayMountSourceOperations) Revalidate(dirent *Dirent) bool { - if o.upper.Revalidate(dirent) || o.lower.Revalidate(dirent) { +func (o *overlayMountSourceOperations) Revalidate(ctx context.Context, dirent *Dirent) bool { + if o.upper.Revalidate(ctx, dirent) || o.lower.Revalidate(ctx, dirent) { panic("an overlay cannot revalidate file objects") } return false |