diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2019-08-01 14:23:54 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-08-01 14:25:14 -0700 |
commit | f2b25aeac7b5ba44144d003fbb2ae657461b8e9b (patch) | |
tree | 3534f3a97327899a0f0c80d3863c835e3d54fccc /pkg/sentry/fs/tmpfs | |
parent | 79511e8a50facd509b8180d0160762b510dd6196 (diff) |
tmpfs and ramfs Dirs should drop references on children in Release().
This is the source of many warnings like:
AtomicRefCount 0x7f5ff84e3500 owned by "fs.Inode" garbage collected with ref count of 1 (want 0)
PiperOrigin-RevId: 261197093
Diffstat (limited to 'pkg/sentry/fs/tmpfs')
-rw-r--r-- | pkg/sentry/fs/tmpfs/tmpfs.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/sentry/fs/tmpfs/tmpfs.go b/pkg/sentry/fs/tmpfs/tmpfs.go index 0f4497cd6..159fb7c08 100644 --- a/pkg/sentry/fs/tmpfs/tmpfs.go +++ b/pkg/sentry/fs/tmpfs/tmpfs.go @@ -56,7 +56,6 @@ func rename(ctx context.Context, oldParent *fs.Inode, oldName string, newParent type Dir struct { fsutil.InodeGenericChecker `state:"nosave"` fsutil.InodeIsDirTruncate `state:"nosave"` - fsutil.InodeNoopRelease `state:"nosave"` fsutil.InodeNoopWriteOut `state:"nosave"` fsutil.InodeNotMappable `state:"nosave"` fsutil.InodeNotSocket `state:"nosave"` @@ -252,6 +251,11 @@ func (d *Dir) Allocate(ctx context.Context, node *fs.Inode, offset, length int64 return d.ramfsDir.Allocate(ctx, node, offset, length) } +// Release implements fs.InodeOperations.Release. +func (d *Dir) Release(ctx context.Context) { + d.ramfsDir.Release(ctx) +} + // Symlink is a symlink. // // +stateify savable |