• Home
  • Raw
  • Download

Lines Matching refs:pde

49 	de = ei->pde;  in proc_evict_inode()
52 ei->pde = NULL; in proc_evict_inode()
75 ei->pde = NULL; in proc_alloc_inode()
206 static inline int use_pde(struct proc_dir_entry *pde) in use_pde() argument
208 return likely(atomic_inc_unless_negative(&pde->in_use)); in use_pde()
211 static void unuse_pde(struct proc_dir_entry *pde) in unuse_pde() argument
213 if (unlikely(atomic_dec_return(&pde->in_use) == BIAS)) in unuse_pde()
214 complete(pde->pde_unload_completion); in unuse_pde()
218 static void close_pdeo(struct proc_dir_entry *pde, struct pde_opener *pdeo) in close_pdeo() argument
219 __releases(&pde->pde_unload_lock) in close_pdeo()
235 spin_unlock(&pde->pde_unload_lock); in close_pdeo()
242 spin_unlock(&pde->pde_unload_lock); in close_pdeo()
244 pde->proc_ops->proc_release(file_inode(file), file); in close_pdeo()
245 spin_lock(&pde->pde_unload_lock); in close_pdeo()
249 spin_unlock(&pde->pde_unload_lock); in close_pdeo()
276 static loff_t pde_lseek(struct proc_dir_entry *pde, struct file *file, loff_t offset, int whence) in pde_lseek() argument
280 lseek = pde->proc_ops->proc_lseek; in pde_lseek()
288 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_llseek() local
291 if (pde_is_permanent(pde)) { in proc_reg_llseek()
292 return pde_lseek(pde, file, offset, whence); in proc_reg_llseek()
293 } else if (use_pde(pde)) { in proc_reg_llseek()
294 rv = pde_lseek(pde, file, offset, whence); in proc_reg_llseek()
295 unuse_pde(pde); in proc_reg_llseek()
302 struct proc_dir_entry *pde = PDE(file_inode(iocb->ki_filp)); in proc_reg_read_iter() local
305 if (pde_is_permanent(pde)) in proc_reg_read_iter()
306 return pde->proc_ops->proc_read_iter(iocb, iter); in proc_reg_read_iter()
308 if (!use_pde(pde)) in proc_reg_read_iter()
310 ret = pde->proc_ops->proc_read_iter(iocb, iter); in proc_reg_read_iter()
311 unuse_pde(pde); in proc_reg_read_iter()
315 static ssize_t pde_read(struct proc_dir_entry *pde, struct file *file, char __user *buf, size_t cou… in pde_read() argument
319 read = pde->proc_ops->proc_read; in pde_read()
327 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_read() local
330 if (pde_is_permanent(pde)) { in proc_reg_read()
331 return pde_read(pde, file, buf, count, ppos); in proc_reg_read()
332 } else if (use_pde(pde)) { in proc_reg_read()
333 rv = pde_read(pde, file, buf, count, ppos); in proc_reg_read()
334 unuse_pde(pde); in proc_reg_read()
339 static ssize_t pde_write(struct proc_dir_entry *pde, struct file *file, const char __user *buf, siz… in pde_write() argument
343 write = pde->proc_ops->proc_write; in pde_write()
351 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_write() local
354 if (pde_is_permanent(pde)) { in proc_reg_write()
355 return pde_write(pde, file, buf, count, ppos); in proc_reg_write()
356 } else if (use_pde(pde)) { in proc_reg_write()
357 rv = pde_write(pde, file, buf, count, ppos); in proc_reg_write()
358 unuse_pde(pde); in proc_reg_write()
363 static __poll_t pde_poll(struct proc_dir_entry *pde, struct file *file, struct poll_table_struct *p… in pde_poll() argument
367 poll = pde->proc_ops->proc_poll; in pde_poll()
375 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_poll() local
378 if (pde_is_permanent(pde)) { in proc_reg_poll()
379 return pde_poll(pde, file, pts); in proc_reg_poll()
380 } else if (use_pde(pde)) { in proc_reg_poll()
381 rv = pde_poll(pde, file, pts); in proc_reg_poll()
382 unuse_pde(pde); in proc_reg_poll()
387 static long pde_ioctl(struct proc_dir_entry *pde, struct file *file, unsigned int cmd, unsigned lon… in pde_ioctl() argument
391 ioctl = pde->proc_ops->proc_ioctl; in pde_ioctl()
399 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_unlocked_ioctl() local
402 if (pde_is_permanent(pde)) { in proc_reg_unlocked_ioctl()
403 return pde_ioctl(pde, file, cmd, arg); in proc_reg_unlocked_ioctl()
404 } else if (use_pde(pde)) { in proc_reg_unlocked_ioctl()
405 rv = pde_ioctl(pde, file, cmd, arg); in proc_reg_unlocked_ioctl()
406 unuse_pde(pde); in proc_reg_unlocked_ioctl()
412 static long pde_compat_ioctl(struct proc_dir_entry *pde, struct file *file, unsigned int cmd, unsig… in pde_compat_ioctl() argument
416 compat_ioctl = pde->proc_ops->proc_compat_ioctl; in pde_compat_ioctl()
424 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_compat_ioctl() local
426 if (pde_is_permanent(pde)) { in proc_reg_compat_ioctl()
427 return pde_compat_ioctl(pde, file, cmd, arg); in proc_reg_compat_ioctl()
428 } else if (use_pde(pde)) { in proc_reg_compat_ioctl()
429 rv = pde_compat_ioctl(pde, file, cmd, arg); in proc_reg_compat_ioctl()
430 unuse_pde(pde); in proc_reg_compat_ioctl()
436 static int pde_mmap(struct proc_dir_entry *pde, struct file *file, struct vm_area_struct *vma) in pde_mmap() argument
440 mmap = pde->proc_ops->proc_mmap; in pde_mmap()
448 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_mmap() local
451 if (pde_is_permanent(pde)) { in proc_reg_mmap()
452 return pde_mmap(pde, file, vma); in proc_reg_mmap()
453 } else if (use_pde(pde)) { in proc_reg_mmap()
454 rv = pde_mmap(pde, file, vma); in proc_reg_mmap()
455 unuse_pde(pde); in proc_reg_mmap()
461 pde_get_unmapped_area(struct proc_dir_entry *pde, struct file *file, unsigned long orig_addr, in pde_get_unmapped_area() argument
467 get_area = pde->proc_ops->proc_get_unmapped_area; in pde_get_unmapped_area()
482 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_get_unmapped_area() local
485 if (pde_is_permanent(pde)) { in proc_reg_get_unmapped_area()
486 return pde_get_unmapped_area(pde, file, orig_addr, len, pgoff, flags); in proc_reg_get_unmapped_area()
487 } else if (use_pde(pde)) { in proc_reg_get_unmapped_area()
488 rv = pde_get_unmapped_area(pde, file, orig_addr, len, pgoff, flags); in proc_reg_get_unmapped_area()
489 unuse_pde(pde); in proc_reg_get_unmapped_area()
497 struct proc_dir_entry *pde = PDE(inode); in proc_reg_open() local
503 if (pde_is_permanent(pde)) { in proc_reg_open()
504 open = pde->proc_ops->proc_open; in proc_reg_open()
524 if (!use_pde(pde)) in proc_reg_open()
527 release = pde->proc_ops->proc_release; in proc_reg_open()
536 open = pde->proc_ops->proc_open; in proc_reg_open()
546 spin_lock(&pde->pde_unload_lock); in proc_reg_open()
547 list_add(&pdeo->lh, &pde->pde_openers); in proc_reg_open()
548 spin_unlock(&pde->pde_unload_lock); in proc_reg_open()
554 unuse_pde(pde); in proc_reg_open()
560 struct proc_dir_entry *pde = PDE(inode); in proc_reg_release() local
563 if (pde_is_permanent(pde)) { in proc_reg_release()
566 release = pde->proc_ops->proc_release; in proc_reg_release()
573 spin_lock(&pde->pde_unload_lock); in proc_reg_release()
574 list_for_each_entry(pdeo, &pde->pde_openers, lh) { in proc_reg_release()
576 close_pdeo(pde, pdeo); in proc_reg_release()
580 spin_unlock(&pde->pde_unload_lock); in proc_reg_release()
647 struct proc_dir_entry *pde = PDE(inode); in proc_get_link() local
648 if (!use_pde(pde)) in proc_get_link()
650 set_delayed_call(done, proc_put_link, pde); in proc_get_link()
651 return pde->data; in proc_get_link()
669 PROC_I(inode)->pde = de; in proc_get_inode()