Lines Matching defs:file
4 #include <linux/file.h>
37 * struct file. Only external open flags shall be allowed in event_f_flags.
129 struct file **file)
132 struct file *new_file;
139 * we need a new file handle for the userspace program so it can read even if it was
147 * we still send an event even if we can't open the file. this
149 * /proc files or we try to open a WRONLY file like in sysfs
156 *file = new_file;
249 * Copy event info fid header followed by variable sized file handle
288 * For an inline fh and inline file name, copy through stack to exclude
331 struct file *f = NULL;
445 /* intofiy userspace file descriptor functions */
446 static __poll_t fanotify_poll(struct file *file, poll_table *wait)
448 struct fsnotify_group *group = file->private_data;
451 poll_wait(file, &group->notification_waitq, wait);
460 static ssize_t fanotify_read(struct file *file, char __user *buf,
470 group = file->private_data;
489 if (file->f_flags & O_NONBLOCK)
545 static ssize_t fanotify_write(struct file *file, const char __user *buf, size_t count, loff_t *pos)
554 group = file->private_data;
573 static int fanotify_release(struct inode *ignored, struct file *file)
575 struct fsnotify_group *group = file->private_data;
628 static long fanotify_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
636 group = file->private_data;
678 if (!f.file)
683 !(S_ISDIR(file_inode(f.file)->i_mode))) {
688 *path = f.file->f_path;
1080 * We need to make sure that the file system supports at least
1081 * encoding a file handle so user can use name_to_handle_at() to
1082 * compare fid returned with event to the file handle of watched
1084 * filesystem also supports decoding file handles.
1192 if (unlikely(!f.file))
1197 if (unlikely(f.file->f_op != &fanotify_fops))
1199 group = f.file->private_data;