mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
vfs: MountNamespace.Root() has to return a top mount of /
A few mounts can be mounted on top of `/`. PiperOrigin-RevId: 558264274
This commit is contained in:
@@ -96,8 +96,7 @@ func NewAccessor(ctx context.Context, vfsObj *vfs.VirtualFilesystem, creds *auth
|
||||
return nil, err
|
||||
}
|
||||
// Pass a reference on root to the Accessor.
|
||||
root := mntns.Root()
|
||||
root.IncRef()
|
||||
root := mntns.Root(ctx)
|
||||
return &Accessor{
|
||||
vfsObj: vfsObj,
|
||||
mntns: mntns,
|
||||
|
||||
@@ -52,8 +52,7 @@ func setupDevtmpfs(t *testing.T) (context.Context, *auth.Credentials, *vfs.Virtu
|
||||
if err != nil {
|
||||
t.Fatalf("failed to create tmpfs root mount: %v", err)
|
||||
}
|
||||
root := mntns.Root()
|
||||
root.IncRef()
|
||||
root := mntns.Root(ctx)
|
||||
devpop := vfs.PathOperation{
|
||||
Root: root,
|
||||
Start: root,
|
||||
|
||||
Reference in New Issue
Block a user