summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2019-05-30 17:19:00 -0700
committerShentubot <shentubot@google.com>2019-05-30 17:20:20 -0700
commit6f73d79c32594cb85cc00b1eaf72bf4c1def2a79 (patch)
tree0fed850946aa5b043e0e495bbb82c149e387ce5f /pkg/sentry/fs
parent38de91b028639ef5f4a4c8874b3ee23503fd2f3a (diff)
Simplify overlayBoundEndpoint.
There is no reason to do the recursion manually, since Inode.BoundEndpoint will do it for us. PiperOrigin-RevId: 250794903
Diffstat (limited to 'pkg/sentry/fs')
-rw-r--r--pkg/sentry/fs/inode_overlay.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/pkg/sentry/fs/inode_overlay.go b/pkg/sentry/fs/inode_overlay.go
index ea574224f..cdffe173b 100644
--- a/pkg/sentry/fs/inode_overlay.go
+++ b/pkg/sentry/fs/inode_overlay.go
@@ -433,12 +433,7 @@ func overlayBoundEndpoint(o *overlayEntry, path string) transport.BoundEndpoint
return o.upper.InodeOperations.BoundEndpoint(o.upper, path)
}
- // If the lower is itself an overlay, recurse.
- if o.lower.overlay != nil {
- return overlayBoundEndpoint(o.lower.overlay, path)
- }
- // Lower is not an overlay. Call BoundEndpoint directly.
- return o.lower.InodeOperations.BoundEndpoint(o.lower, path)
+ return o.lower.BoundEndpoint(path)
}
func overlayGetFile(ctx context.Context, o *overlayEntry, d *Dirent, flags FileFlags) (*File, error) {