summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-05-29 15:12:51 +0000
committergVisor bot <gvisor-bot@google.com>2020-05-29 15:12:51 +0000
commit2470312351ab76897d8e151f2008b6acacda706a (patch)
tree6457da4e3a19e2d76d2475183a383b06032ace29 /pkg/sentry/kernel
parentd00bd5bdee15b028787faa81288ebc56ad0abf84 (diff)
parentfe464f44b7d3696bafd9a2faf3750e1dc4d56d80 (diff)
Merge release-20200522.0-27-gfe464f44 (automated)
Diffstat (limited to 'pkg/sentry/kernel')
-rw-r--r--pkg/sentry/kernel/fd_table.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/sentry/kernel/fd_table.go b/pkg/sentry/kernel/fd_table.go
index ed40b5303..ef73e1169 100644
--- a/pkg/sentry/kernel/fd_table.go
+++ b/pkg/sentry/kernel/fd_table.go
@@ -152,7 +152,13 @@ func (f *FDTable) drop(file *fs.File) {
// dropVFS2 drops the table reference.
func (f *FDTable) dropVFS2(file *vfs.FileDescription) {
// TODO(gvisor.dev/issue/1480): Release locks.
- // TODO(gvisor.dev/issue/1479): Send inotify events.
+
+ // Generate inotify events.
+ ev := uint32(linux.IN_CLOSE_NOWRITE)
+ if file.IsWritable() {
+ ev = linux.IN_CLOSE_WRITE
+ }
+ file.Dentry().InotifyWithParent(ev, 0)
// Drop the table reference.
file.DecRef()