> > IDGI. What is the problem with: > > if (mask & MAY_OPEN) { > fsnotify_mask = FS_OPEN_PERM; > if (file->f_flags & __FMODE_EXEC) { > ret = fsnotify_path(inode, path, FS_OPEN_EXEC_PERM); > if (ret) return ret; > } > } else if (mask & MAY_READ) { > fsnotify_mask = FS_ACCESS_PERM; > } > > return fsnotify_path(inode, path, FS_OPEN_EXEC_PERM); Typo: return fsnotify_path(inode, path, fsnotify_mask); > > You can consolidate all 5 calls to fsnotify_parent();fsnotify() of the same > pattern to fsnotify_path(). > > Thanks, > Amir.