Add inotify support to kernfs and anonfs.

This is consistent with Linux. Some applications recursively add
files to inotify FD. They fail if they run into kernfs files
because inotify_add_watch(2) returns EPERM in that case.

PiperOrigin-RevId: 462642204
This commit is contained in:
Ayush Ranjan
2022-07-22 09:45:24 -07:00
committed by gVisor bot
parent c8f981f9b2
commit bf4d27a6ca
29 changed files with 133 additions and 37 deletions
+1
View File
@@ -152,6 +152,7 @@ type rootInode struct {
kernfs.InodeDirectoryNoNewChildren
kernfs.InodeNotSymlink
kernfs.InodeTemporary // This holds no meaning as this inode can't be Looked up and is always valid.
kernfs.InodeWatches
kernfs.OrderedChildren
rootInodeRefs
+1
View File
@@ -38,6 +38,7 @@ type masterInode struct {
kernfs.InodeNoopRefCount
kernfs.InodeNotDirectory
kernfs.InodeNotSymlink
kernfs.InodeWatches
locks vfs.FileLocks
+1
View File
@@ -37,6 +37,7 @@ type replicaInode struct {
kernfs.InodeNoopRefCount
kernfs.InodeNotDirectory
kernfs.InodeNotSymlink
kernfs.InodeWatches
locks vfs.FileLocks