Simplify overlayBoundEndpoint.

There is no reason to do the recursion manually, since
Inode.BoundEndpoint will do it for us.

PiperOrigin-RevId: 250794903
This commit is contained in:
Nicolas Lacasse
2019-05-30 17:20:20 -07:00
committed by Shentubot
parent 38de91b028
commit 6f73d79c32
+1 -6
View File
@@ -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) {