diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-10-31 00:46:55 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-31 00:46:55 +0000 |
commit | 6f35d56b4f6e2d7b28c0e54770539e96f8a3dc89 (patch) | |
tree | eaebae83975b0110c9e0f0d96d126667de0a3b65 | |
parent | e0bd5098f6e39a35b2e93335e450721548e2c0aa (diff) | |
parent | 1f25697cfe0484198784afc947ae3bdf4eb05e9b (diff) |
Merge release-20201019.0-113-g1f25697cf (automated)
-rw-r--r-- | pkg/sentry/fsimpl/kernfs/inode_impl_util.go | 9 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go | 20 |
2 files changed, 1 insertions, 28 deletions
diff --git a/pkg/sentry/fsimpl/kernfs/inode_impl_util.go b/pkg/sentry/fsimpl/kernfs/inode_impl_util.go index d9d76758a..4f78437d2 100644 --- a/pkg/sentry/fsimpl/kernfs/inode_impl_util.go +++ b/pkg/sentry/fsimpl/kernfs/inode_impl_util.go @@ -568,13 +568,6 @@ func (o *OrderedChildren) RmDir(ctx context.Context, name string, child Inode) e return o.Unlink(ctx, name, child) } -// +stateify savable -type renameAcrossDifferentImplementationsError struct{} - -func (renameAcrossDifferentImplementationsError) Error() string { - return "rename across inodes with different implementations" -} - // Rename implements Inode.Rename. // // Precondition: Rename may only be called across two directory inodes with @@ -587,7 +580,7 @@ func (renameAcrossDifferentImplementationsError) Error() string { func (o *OrderedChildren) Rename(ctx context.Context, oldname, newname string, child, dstDir Inode) error { dst, ok := dstDir.(interface{}).(*OrderedChildren) if !ok { - return renameAcrossDifferentImplementationsError{} + return syserror.ENODEV } if !o.writable || !dst.writable { return syserror.EPERM diff --git a/pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go b/pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go index 0088ec826..7ac76bd5b 100644 --- a/pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go +++ b/pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go @@ -427,25 +427,6 @@ func (o *OrderedChildren) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(2, &o.set) } -func (r *renameAcrossDifferentImplementationsError) StateTypeName() string { - return "pkg/sentry/fsimpl/kernfs.renameAcrossDifferentImplementationsError" -} - -func (r *renameAcrossDifferentImplementationsError) StateFields() []string { - return []string{} -} - -func (r *renameAcrossDifferentImplementationsError) beforeSave() {} - -func (r *renameAcrossDifferentImplementationsError) StateSave(stateSinkObject state.Sink) { - r.beforeSave() -} - -func (r *renameAcrossDifferentImplementationsError) afterLoad() {} - -func (r *renameAcrossDifferentImplementationsError) StateLoad(stateSourceObject state.Source) { -} - func (i *InodeSymlink) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.InodeSymlink" } @@ -908,7 +889,6 @@ func init() { state.Register((*slot)(nil)) state.Register((*OrderedChildrenOptions)(nil)) state.Register((*OrderedChildren)(nil)) - state.Register((*renameAcrossDifferentImplementationsError)(nil)) state.Register((*InodeSymlink)(nil)) state.Register((*StaticDirectory)(nil)) state.Register((*InodeAlwaysValid)(nil)) |