diff options
author | Ayush Ranjan <ayushranjan@google.com> | 2021-10-08 15:38:41 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-10-08 15:40:49 -0700 |
commit | 34e68b6b4ff04de5c7b5e2dc46e5bd44c6845e63 (patch) | |
tree | 2da78e71089406b10605299b73120dc5f3da6b07 | |
parent | da41ecc5be8a25d116b520da2c3d424ef488b159 (diff) |
Remove redundant slice copy in lisafs gofer client.
listXattr() was doing redundant work. Remove it.
PiperOrigin-RevId: 401871315
-rw-r--r-- | pkg/sentry/fsimpl/gofer/gofer.go | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/pkg/sentry/fsimpl/gofer/gofer.go b/pkg/sentry/fsimpl/gofer/gofer.go index 2dd9226c1..b98825e26 100644 --- a/pkg/sentry/fsimpl/gofer/gofer.go +++ b/pkg/sentry/fsimpl/gofer/gofer.go @@ -2049,16 +2049,7 @@ func (d *dentry) listXattr(ctx context.Context, size uint64) ([]string, error) { } if d.fs.opts.lisaEnabled { - xattrs, err := d.controlFDLisa.ListXattr(ctx, size) - if err != nil { - return nil, err - } - - res := make([]string, 0, len(xattrs)) - for _, xattr := range xattrs { - res = append(res, xattr) - } - return res, nil + return d.controlFDLisa.ListXattr(ctx, size) } xattrMap, err := d.file.listXattr(ctx, size) |