From 4bab7d7f084c4ce4a8bf5860b71df6aee757cd5c Mon Sep 17 00:00:00 2001 From: Ayush Ranjan Date: Fri, 16 Aug 2019 10:18:58 -0700 Subject: vfs: Remove vfs.DefaultDirectoryFD from embedding vfs.DefaultFD. This fixes the implementation ambiguity issues when a filesystem implementation embeds vfs.DefaultDirectoryFD to its directory FD along with an internal common fileDescription utility. For similar reasons also removes FileDescriptionDefaultImpl from DynamicBytesFileDescriptionImpl. PiperOrigin-RevId: 263795513 --- pkg/sentry/fsimpl/memfs/memfs.go | 1 + pkg/sentry/fsimpl/memfs/regular_file.go | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/sentry/fsimpl/memfs') diff --git a/pkg/sentry/fsimpl/memfs/memfs.go b/pkg/sentry/fsimpl/memfs/memfs.go index 59612da14..45cd42b3e 100644 --- a/pkg/sentry/fsimpl/memfs/memfs.go +++ b/pkg/sentry/fsimpl/memfs/memfs.go @@ -258,6 +258,7 @@ func (i *inode) direntType() uint8 { // vfs.FileDescriptionImpl. type fileDescription struct { vfsfd vfs.FileDescription + vfs.FileDescriptionDefaultImpl flags uint32 // status flags; immutable } diff --git a/pkg/sentry/fsimpl/memfs/regular_file.go b/pkg/sentry/fsimpl/memfs/regular_file.go index 7a16d5719..55f869798 100644 --- a/pkg/sentry/fsimpl/memfs/regular_file.go +++ b/pkg/sentry/fsimpl/memfs/regular_file.go @@ -46,7 +46,6 @@ func (fs *filesystem) newRegularFile(creds *auth.Credentials, mode uint16) *inod type regularFileFD struct { fileDescription - vfs.FileDescriptionDefaultImpl // These are immutable. readable bool -- cgit v1.2.3