diff options
author | Dean Deng <deandeng@google.com> | 2020-09-28 16:09:27 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-09-28 16:11:16 -0700 |
commit | a0e0ba690f3f4946890010e12084db7f081d5bc7 (patch) | |
tree | 0ecc1265e59ac8d0b2e03a4205e64f072d993b3d /pkg/sentry/fsimpl/overlay/directory.go | |
parent | fa995da840f129d6ced03d66f4f7a747ef4df0bf (diff) |
Support inotify in overlayfs.
Fixes #1479, #317.
PiperOrigin-RevId: 334258052
Diffstat (limited to 'pkg/sentry/fsimpl/overlay/directory.go')
-rw-r--r-- | pkg/sentry/fsimpl/overlay/directory.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/overlay/directory.go b/pkg/sentry/fsimpl/overlay/directory.go index aea599460..df4492346 100644 --- a/pkg/sentry/fsimpl/overlay/directory.go +++ b/pkg/sentry/fsimpl/overlay/directory.go @@ -117,10 +117,12 @@ func (fd *directoryFD) Release(ctx context.Context) { // IterDirents implements vfs.FileDescriptionImpl.IterDirents. func (fd *directoryFD) IterDirents(ctx context.Context, cb vfs.IterDirentsCallback) error { + d := fd.dentry() + defer d.InotifyWithParent(ctx, linux.IN_ACCESS, 0, vfs.PathEvent) + fd.mu.Lock() defer fd.mu.Unlock() - d := fd.dentry() if fd.dirents == nil { ds, err := d.getDirents(ctx) if err != nil { |