From 3946075403a93907138f13e61bdba075aeabfecf Mon Sep 17 00:00:00 2001 From: Dean Deng Date: Tue, 26 Jan 2021 00:00:52 -0800 Subject: Do not generate extraneous IN_CLOSE inotify events. IN_CLOSE should only be generated when a file description loses its last reference; not when a file descriptor is closed. See fs/file_table.c:__fput. Updates #5348. PiperOrigin-RevId: 353810697 --- pkg/sentry/kernel/fd_table.go | 7 ------- 1 file changed, 7 deletions(-) (limited to 'pkg/sentry/kernel/fd_table.go') diff --git a/pkg/sentry/kernel/fd_table.go b/pkg/sentry/kernel/fd_table.go index 97aa679ed..a6afabb1c 100644 --- a/pkg/sentry/kernel/fd_table.go +++ b/pkg/sentry/kernel/fd_table.go @@ -159,13 +159,6 @@ func (f *FDTable) dropVFS2(ctx context.Context, file *vfs.FileDescription) { panic(fmt.Sprintf("UnlockPOSIX failed: %v", err)) } - // Generate inotify events. - ev := uint32(linux.IN_CLOSE_NOWRITE) - if file.IsWritable() { - ev = linux.IN_CLOSE_WRITE - } - file.Dentry().InotifyWithParent(ctx, ev, 0, vfs.PathEvent) - // Drop the table's reference. file.DecRef(ctx) } -- cgit v1.2.3