Lines Matching full:file

19 #include <linux/file.h>
226 * "struct file" needs to be available at the right moment. in close_pdeo()
235 struct file *file; in close_pdeo() local
241 file = pdeo->file; in close_pdeo()
242 pde->proc_ops->proc_release(file_inode(file), file); in close_pdeo()
275 static loff_t proc_reg_llseek(struct file *file, loff_t offset, int whence) in proc_reg_llseek() argument
277 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_llseek()
281 return pde->proc_ops->proc_lseek(file, offset, whence); in proc_reg_llseek()
283 rv = pde->proc_ops->proc_lseek(file, offset, whence); in proc_reg_llseek()
304 static ssize_t pde_read(struct proc_dir_entry *pde, struct file *file, char __user *buf, size_t cou… in pde_read() argument
308 return read(file, buf, count, ppos); in pde_read()
312 static ssize_t proc_reg_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) in proc_reg_read() argument
314 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_read()
318 return pde_read(pde, file, buf, count, ppos); in proc_reg_read()
320 rv = pde_read(pde, file, buf, count, ppos); in proc_reg_read()
326 static ssize_t pde_write(struct proc_dir_entry *pde, struct file *file, const char __user *buf, siz… in pde_write() argument
330 return write(file, buf, count, ppos); in pde_write()
334 static ssize_t proc_reg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) in proc_reg_write() argument
336 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_write()
340 return pde_write(pde, file, buf, count, ppos); in proc_reg_write()
342 rv = pde_write(pde, file, buf, count, ppos); in proc_reg_write()
348 static __poll_t pde_poll(struct proc_dir_entry *pde, struct file *file, struct poll_table_struct *p… in pde_poll() argument
352 return poll(file, pts); in pde_poll()
356 static __poll_t proc_reg_poll(struct file *file, struct poll_table_struct *pts) in proc_reg_poll() argument
358 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_poll()
362 return pde_poll(pde, file, pts); in proc_reg_poll()
364 rv = pde_poll(pde, file, pts); in proc_reg_poll()
370 static long pde_ioctl(struct proc_dir_entry *pde, struct file *file, unsigned int cmd, unsigned lon… in pde_ioctl() argument
374 return ioctl(file, cmd, arg); in pde_ioctl()
378 static long proc_reg_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) in proc_reg_unlocked_ioctl() argument
380 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_unlocked_ioctl()
384 return pde_ioctl(pde, file, cmd, arg); in proc_reg_unlocked_ioctl()
386 rv = pde_ioctl(pde, file, cmd, arg); in proc_reg_unlocked_ioctl()
393 static long pde_compat_ioctl(struct proc_dir_entry *pde, struct file *file, unsigned int cmd, unsig… in pde_compat_ioctl() argument
397 return compat_ioctl(file, cmd, arg); in pde_compat_ioctl()
401 static long proc_reg_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) in proc_reg_compat_ioctl() argument
403 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_compat_ioctl()
406 return pde_compat_ioctl(pde, file, cmd, arg); in proc_reg_compat_ioctl()
408 rv = pde_compat_ioctl(pde, file, cmd, arg); in proc_reg_compat_ioctl()
415 static int pde_mmap(struct proc_dir_entry *pde, struct file *file, struct vm_area_struct *vma) in pde_mmap() argument
419 return mmap(file, vma); in pde_mmap()
423 static int proc_reg_mmap(struct file *file, struct vm_area_struct *vma) in proc_reg_mmap() argument
425 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_mmap()
429 return pde_mmap(pde, file, vma); in proc_reg_mmap()
431 rv = pde_mmap(pde, file, vma); in proc_reg_mmap()
438 pde_get_unmapped_area(struct proc_dir_entry *pde, struct file *file, unsigned long orig_addr, in pde_get_unmapped_area() argument
443 return pde->proc_ops->proc_get_unmapped_area(file, orig_addr, len, pgoff, flags); in pde_get_unmapped_area()
446 return mm_get_unmapped_area(current->mm, file, orig_addr, len, pgoff, flags); in pde_get_unmapped_area()
453 proc_reg_get_unmapped_area(struct file *file, unsigned long orig_addr, in proc_reg_get_unmapped_area() argument
457 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_get_unmapped_area()
461 return pde_get_unmapped_area(pde, file, orig_addr, len, pgoff, flags); in proc_reg_get_unmapped_area()
463 rv = pde_get_unmapped_area(pde, file, orig_addr, len, pgoff, flags); in proc_reg_get_unmapped_area()
469 static int proc_reg_open(struct inode *inode, struct file *file) in proc_reg_open() argument
477 file->f_mode &= ~FMODE_LSEEK; in proc_reg_open()
482 rv = open(inode, file); in proc_reg_open()
492 * 2) rmmod isn't blocked by opening file in /proc and sitting on in proc_reg_open()
495 * Save every "struct file" with custom ->release hook. in proc_reg_open()
511 rv = open(inode, file); in proc_reg_open()
516 pdeo->file = file; in proc_reg_open()
531 static int proc_reg_release(struct inode *inode, struct file *file) in proc_reg_release() argument
539 return release(inode, file); in proc_reg_release()
546 if (pdeo->file == file) { in proc_reg_release()