diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2019-05-30 17:19:00 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-05-30 17:20:20 -0700 |
commit | 6f73d79c32594cb85cc00b1eaf72bf4c1def2a79 (patch) | |
tree | 0fed850946aa5b043e0e495bbb82c149e387ce5f /pkg | |
parent | 38de91b028639ef5f4a4c8874b3ee23503fd2f3a (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')
-rw-r--r-- | pkg/sentry/fs/inode_overlay.go | 7 |
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) { |