mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Fix walking to attach path logic in lisafs.
The attach path (if one exists) is always absolute. This is checked while setting that option. strings.Split(aname, "/") creates an extra empty string in the beginning of the slice. Exclude that while making Walk RPC. PiperOrigin-RevId: 428046171
This commit is contained in:
@@ -541,9 +541,9 @@ func (fs *filesystem) initClientLisa(ctx context.Context) (lisafs.Inode, error)
|
||||
return rootInode, nil
|
||||
}
|
||||
|
||||
// Walk to the attach point from root inode.
|
||||
// Walk to the attach point from root inode. aname is always absolute.
|
||||
rootFD := fs.clientLisa.NewFD(rootInode.ControlFD)
|
||||
status, inodes, err := rootFD.WalkMultiple(ctx, strings.Split(fs.opts.aname, "/"))
|
||||
status, inodes, err := rootFD.WalkMultiple(ctx, strings.Split(fs.opts.aname, "/")[1:])
|
||||
rootFD.CloseBatched(ctx)
|
||||
if err != nil {
|
||||
return lisafs.Inode{}, err
|
||||
|
||||
Reference in New Issue
Block a user