Lines Matching refs:file

116 static inline int fsnotify_file(struct file *file, __u32 mask)  in fsnotify_file()  argument
124 if (FMODE_FSNOTIFY_NONE(file->f_mode)) in fsnotify_file()
127 return fsnotify_path(&file->f_path, mask); in fsnotify_file()
132 void file_set_fsnotify_mode_from_watchers(struct file *file);
137 static inline int fsnotify_file_area_perm(struct file *file, int perm_mask, in fsnotify_file_area_perm() argument
145 lockdep_assert_once(file_write_not_started(file)); in fsnotify_file_area_perm()
150 if (likely(!FMODE_FSNOTIFY_PERM(file->f_mode))) in fsnotify_file_area_perm()
156 if (unlikely(FMODE_FSNOTIFY_HSM(file->f_mode))) { in fsnotify_file_area_perm()
157 int ret = fsnotify_pre_content(&file->f_path, ppos, count); in fsnotify_file_area_perm()
170 return fsnotify_path(&file->f_path, FS_ACCESS_PERM); in fsnotify_file_area_perm()
176 static inline int fsnotify_mmap_perm(struct file *file, int prot, in fsnotify_mmap_perm() argument
182 if (!file || likely(!FMODE_FSNOTIFY_HSM(file->f_mode))) in fsnotify_mmap_perm()
185 return fsnotify_pre_content(&file->f_path, &off, len); in fsnotify_mmap_perm()
206 static inline int fsnotify_file_perm(struct file *file, int perm_mask) in fsnotify_file_perm() argument
208 return fsnotify_file_area_perm(file, perm_mask, NULL, 0); in fsnotify_file_perm()
214 static inline int fsnotify_open_perm(struct file *file) in fsnotify_open_perm() argument
218 if (likely(!FMODE_FSNOTIFY_PERM(file->f_mode))) in fsnotify_open_perm()
221 if (file->f_flags & __FMODE_EXEC) { in fsnotify_open_perm()
222 ret = fsnotify_path(&file->f_path, FS_OPEN_EXEC_PERM); in fsnotify_open_perm()
227 return fsnotify_path(&file->f_path, FS_OPEN_PERM); in fsnotify_open_perm()
231 static inline void file_set_fsnotify_mode_from_watchers(struct file *file) in file_set_fsnotify_mode_from_watchers() argument
235 static inline int fsnotify_file_area_perm(struct file *file, int perm_mask, in fsnotify_file_area_perm() argument
241 static inline int fsnotify_mmap_perm(struct file *file, int prot, in fsnotify_mmap_perm() argument
252 static inline int fsnotify_file_perm(struct file *file, int perm_mask) in fsnotify_file_perm() argument
257 static inline int fsnotify_open_perm(struct file *file) in fsnotify_open_perm() argument
448 static inline void fsnotify_access(struct file *file) in fsnotify_access() argument
450 fsnotify_file(file, FS_ACCESS); in fsnotify_access()
456 static inline void fsnotify_modify(struct file *file) in fsnotify_modify() argument
458 fsnotify_file(file, FS_MODIFY); in fsnotify_modify()
464 static inline void fsnotify_open(struct file *file) in fsnotify_open() argument
468 if (file->f_flags & __FMODE_EXEC) in fsnotify_open()
471 fsnotify_file(file, mask); in fsnotify_open()
477 static inline void fsnotify_close(struct file *file) in fsnotify_close() argument
479 __u32 mask = (file->f_mode & FMODE_WRITE) ? FS_CLOSE_WRITE : in fsnotify_close()
482 fsnotify_file(file, mask); in fsnotify_close()