diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-01-26 08:16:11 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-26 08:16:11 +0000 |
commit | 7430db20e47c7d225c884279e1fea0fe33636e26 (patch) | |
tree | 922a15c34e90916bbe3ada98d46db705e70fad91 /pkg/sentry/vfs/file_description.go | |
parent | b534f359c770f98d03188befc92c8ca449e936c0 (diff) | |
parent | 3946075403a93907138f13e61bdba075aeabfecf (diff) |
Merge release-20210112.0-89-g394607540 (automated)
Diffstat (limited to 'pkg/sentry/vfs/file_description.go')
-rw-r--r-- | pkg/sentry/vfs/file_description.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/sentry/vfs/file_description.go b/pkg/sentry/vfs/file_description.go index eb6c2e36b..326e35688 100644 --- a/pkg/sentry/vfs/file_description.go +++ b/pkg/sentry/vfs/file_description.go @@ -161,6 +161,13 @@ func (fd *FileDescription) Init(impl FileDescriptionImpl, flags uint32, mnt *Mou // DecRef decrements fd's reference count. func (fd *FileDescription) DecRef(ctx context.Context) { fd.FileDescriptionRefs.DecRef(func() { + // Generate inotify events. + ev := uint32(linux.IN_CLOSE_NOWRITE) + if fd.IsWritable() { + ev = linux.IN_CLOSE_WRITE + } + fd.Dentry().InotifyWithParent(ctx, ev, 0, PathEvent) + // Unregister fd from all epoll instances. fd.epollMu.Lock() epolls := fd.epolls |