diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2019-04-05 15:48:26 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-04-05 15:49:39 -0700 |
commit | ee7e6d33b2a017a53bebfdc55d182f53474d4d7d (patch) | |
tree | 91c302c8844f62f9c168e571231ecf4cb5e3fbb7 /pkg/sentry/fs/inode.go | |
parent | f44f2f73b068658ddf632586e2178e372fcd1cbd (diff) |
Use string type for extended attribute values, instead of []byte.
Strings are a better fit for this usage because they are immutable in Go, and
can contain arbitrary bytes. It also allows us to avoid casting bytes to string
(and the associated allocation) in the hot path when checking for overlay
whiteouts.
PiperOrigin-RevId: 242208856
Change-Id: I7699ae6302492eca71787dd0b72e0a5a217a3db2
Diffstat (limited to 'pkg/sentry/fs/inode.go')
-rw-r--r-- | pkg/sentry/fs/inode.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/fs/inode.go b/pkg/sentry/fs/inode.go index b8b5c1528..d82f9740e 100644 --- a/pkg/sentry/fs/inode.go +++ b/pkg/sentry/fs/inode.go @@ -253,7 +253,7 @@ func (i *Inode) UnstableAttr(ctx context.Context) (UnstableAttr, error) { } // Getxattr calls i.InodeOperations.Getxattr with i as the Inode. -func (i *Inode) Getxattr(name string) ([]byte, error) { +func (i *Inode) Getxattr(name string) (string, error) { if i.overlay != nil { return overlayGetxattr(i.overlay, name) } |