Lines Matching refs:file
41 static int prepare_seq_file(struct file *file, struct bpf_iter_link *link,
94 static ssize_t bpf_seq_read(struct file *file, char __user *buf, size_t size, in bpf_seq_read() argument
97 struct seq_file *seq = file->private_data; in bpf_seq_read()
256 static int iter_open(struct inode *inode, struct file *file) in iter_open() argument
260 return prepare_seq_file(file, link, __get_seq_info(link)); in iter_open()
263 static int iter_release(struct inode *inode, struct file *file) in iter_release() argument
268 seq = file->private_data; in iter_release()
281 return seq_release_private(inode, file); in iter_release()
591 static int prepare_seq_file(struct file *file, struct bpf_iter_link *link, in prepare_seq_file() argument
609 priv_data = __seq_open_private(file, seq_info->seq_ops, in prepare_seq_file()
623 seq = file->private_data; in prepare_seq_file()
629 seq_release_private(file->f_inode, file); in prepare_seq_file()
630 file->private_data = NULL; in prepare_seq_file()
639 struct file *file; in bpf_iter_new_fd() local
651 file = anon_inode_getfile("bpf_iter", &bpf_iter_fops, NULL, flags); in bpf_iter_new_fd()
652 if (IS_ERR(file)) { in bpf_iter_new_fd()
653 err = PTR_ERR(file); in bpf_iter_new_fd()
658 err = prepare_seq_file(file, iter_link, __get_seq_info(iter_link)); in bpf_iter_new_fd()
662 fd_install(fd, file); in bpf_iter_new_fd()
666 fput(file); in bpf_iter_new_fd()
679 if (seq->file->f_op != &bpf_iter_fops) in bpf_iter_get_info()