Lines Matching refs:file
38 static ssize_t pending_reads_read(struct file *f, char __user *buf, size_t len, in pending_reads_read()
106 static __poll_t pending_reads_poll(struct file *file, poll_table *wait) in pending_reads_poll() argument
108 struct pending_reads_state *state = file->private_data; in pending_reads_poll()
109 struct mount_info *mi = get_mount_info(file_superblock(file)); in pending_reads_poll()
112 poll_wait(file, &mi->mi_pending_reads_notif_wq, wait); in pending_reads_poll()
120 static int pending_reads_open(struct inode *inode, struct file *file) in pending_reads_open() argument
128 file->private_data = state; in pending_reads_open()
132 static int pending_reads_release(struct inode *inode, struct file *file) in pending_reads_release() argument
134 kfree(file->private_data); in pending_reads_release()
138 static long ioctl_permit_fill(struct file *f, void __user *arg) in ioctl_permit_fill()
143 struct file *file = NULL; in ioctl_permit_fill() local
149 file = fget(permit_fill.file_descriptor); in ioctl_permit_fill()
150 if (IS_ERR_OR_NULL(file)) { in ioctl_permit_fill()
151 if (!file) in ioctl_permit_fill()
154 return PTR_ERR(file); in ioctl_permit_fill()
157 if (file->f_op != &incfs_file_ops) { in ioctl_permit_fill()
162 if (file->f_inode->i_sb != f->f_inode->i_sb) { in ioctl_permit_fill()
167 fd = file->private_data; in ioctl_permit_fill()
185 fput(file); in ioctl_permit_fill()
242 struct file *dir_f = NULL; in dir_relative_path_resolve()
304 struct file *new_file; in init_new_file()
389 static void notify_create(struct file *pending_reads_file, in notify_create()
400 struct dentry *file = NULL; in notify_create() local
408 file = incfs_lookup_dentry(dir_path.dentry, file_name); in notify_create()
409 if (IS_ERR(file)) { in notify_create()
410 error = PTR_ERR(file); in notify_create()
411 file = NULL; in notify_create()
415 fsnotify_create(d_inode(dir_path.dentry), file); in notify_create()
425 dput(file); in notify_create()
426 file = incfs_lookup_dentry(dir, file_id_str); in notify_create()
427 if (IS_ERR(file)) { in notify_create()
428 error = PTR_ERR(file); in notify_create()
429 file = NULL; in notify_create()
433 fsnotify_create(d_inode(dir), file); in notify_create()
445 dput(file); in notify_create()
446 file = incfs_lookup_dentry(dir, file_id_str); in notify_create()
447 if (IS_ERR(file)) { in notify_create()
448 error = PTR_ERR(file); in notify_create()
449 file = NULL; in notify_create()
453 fsnotify_create(d_inode(dir), file); in notify_create()
461 dput(file); in notify_create()
465 static long ioctl_create_file(struct file *file, in ioctl_create_file() argument
468 struct mount_info *mi = get_mount_info(file_superblock(file)); in ioctl_create_file()
679 notify_create(file, u64_to_user_ptr(args.directory_path), file_name, in ioctl_create_file()
710 struct file *new_file; in init_new_mapped_file()
754 static long ioctl_create_mapped_file(struct file *file, void __user *arg) in ioctl_create_mapped_file() argument
756 struct mount_info *mi = get_mount_info(file_superblock(file)); in ioctl_create_mapped_file()
891 notify_create(file, u64_to_user_ptr(args.directory_path), file_name, in ioctl_create_mapped_file()
1021 static long pending_reads_dispatch_ioctl(struct file *f, unsigned int req, in pending_reads_dispatch_ioctl()
1065 static ssize_t log_read(struct file *f, char __user *buf, size_t len, in log_read()
1138 static __poll_t log_poll(struct file *file, poll_table *wait) in log_poll() argument
1140 struct log_file_state *log_state = file->private_data; in log_poll()
1141 struct mount_info *mi = get_mount_info(file_superblock(file)); in log_poll()
1145 poll_wait(file, &mi->mi_log.ml_notif_wq, wait); in log_poll()
1153 static int log_open(struct inode *inode, struct file *file) in log_open() argument
1156 struct mount_info *mi = get_mount_info(file_superblock(file)); in log_open()
1163 file->private_data = log_state; in log_open()
1167 static int log_release(struct inode *inode, struct file *file) in log_release() argument
1169 kfree(file->private_data); in log_release()
1192 static ssize_t blocks_written_read(struct file *f, char __user *buf, size_t len, in blocks_written_read()
1218 static __poll_t blocks_written_poll(struct file *f, poll_table *wait) in blocks_written_poll()
1235 static int blocks_written_open(struct inode *inode, struct file *file) in blocks_written_open() argument
1244 file->private_data = state; in blocks_written_open()
1248 static int blocks_written_release(struct inode *inode, struct file *file) in blocks_written_release() argument
1250 kfree(file->private_data); in blocks_written_release()