Lines Matching refs:fp
88 off_t foffset_lock(struct file *fp, int flags);
89 void foffset_lock_uio(struct file *fp, struct uio *uio, int flags);
90 void foffset_unlock(struct file *fp, off_t val, int flags);
91 void foffset_unlock_uio(struct file *fp, struct uio *uio, int flags);
94 foffset_get(struct file *fp) in foffset_get() argument
97 return (foffset_lock(fp, FOF_NOLOCK)); in foffset_get()
100 typedef int fo_rdwr_t(struct file *fp, struct uio *uio,
103 typedef int fo_truncate_t(struct file *fp, off_t length,
105 typedef int fo_ioctl_t(struct file *fp, u_long com, void *data,
107 typedef int fo_poll_t(struct file *fp, int events,
109 typedef int fo_kqfilter_t(struct file *fp, struct knote *kn);
110 typedef int fo_stat_t(struct file *fp, struct stat *sb,
112 typedef int fo_close_t(struct file *fp, struct thread *td);
113 typedef int fo_chmod_t(struct file *fp, mode_t mode,
115 typedef int fo_chown_t(struct file *fp, uid_t uid, gid_t gid,
117 typedef int fo_sendfile_t(struct file *fp, int sockfd, struct uio *hdr_uio,
120 typedef int fo_seek_t(struct file *fp, off_t offset, int whence,
122 typedef int fo_fill_kinfo_t(struct file *fp, struct kinfo_file *kif,
124 typedef int fo_mmap_t(struct file *fp, vm_map_t map, vm_offset_t *addr,
127 typedef int fo_aio_queue_t(struct file *fp, struct kaiocb *job);
128 typedef int fo_add_seals_t(struct file *fp, int flags);
129 typedef int fo_get_seals_t(struct file *fp, int *flags);
130 typedef int fo_fallocate_t(struct file *fp, off_t offset, off_t len,
255 int _fdrop(struct file *fp, struct thread *td);
286 fhold(struct file *fp) in fhold() argument
288 return (refcount_acquire_checked(&fp->f_count)); in fhold()
291 #define fdrop(fp, td) ({ \ argument
296 _fp = (fp); \
302 #define fdrop_close(fp, td) ({ \ argument
307 _fp = (fp); \
326 fo_read(struct file *fp, struct uio *uio, struct ucred *active_cred, in fo_read() argument
330 return ((*fp->f_ops->fo_read)(fp, uio, active_cred, flags, td)); in fo_read()
334 fo_write(struct file *fp, struct uio *uio, struct ucred *active_cred, in fo_write() argument
338 return ((*fp->f_ops->fo_write)(fp, uio, active_cred, flags, td)); in fo_write()
342 fo_truncate(struct file *fp, off_t length, struct ucred *active_cred, in fo_truncate() argument
346 return ((*fp->f_ops->fo_truncate)(fp, length, active_cred, td)); in fo_truncate()
350 fo_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred, in fo_ioctl() argument
354 return ((*fp->f_ops->fo_ioctl)(fp, com, data, active_cred, td)); in fo_ioctl()
358 fo_poll(struct file *fp, int events, struct ucred *active_cred, in fo_poll() argument
362 return ((*fp->f_ops->fo_poll)(fp, events, active_cred, td)); in fo_poll()
366 fo_stat(struct file *fp, struct stat *sb, struct ucred *active_cred, in fo_stat() argument
370 return ((*fp->f_ops->fo_stat)(fp, sb, active_cred, td)); in fo_stat()
374 fo_close(struct file *fp, struct thread *td) in fo_close() argument
377 return ((*fp->f_ops->fo_close)(fp, td)); in fo_close()
381 fo_kqfilter(struct file *fp, struct knote *kn) in fo_kqfilter() argument
384 return ((*fp->f_ops->fo_kqfilter)(fp, kn)); in fo_kqfilter()
388 fo_chmod(struct file *fp, mode_t mode, struct ucred *active_cred, in fo_chmod() argument
392 return ((*fp->f_ops->fo_chmod)(fp, mode, active_cred, td)); in fo_chmod()
396 fo_chown(struct file *fp, uid_t uid, gid_t gid, struct ucred *active_cred, in fo_chown() argument
400 return ((*fp->f_ops->fo_chown)(fp, uid, gid, active_cred, td)); in fo_chown()
404 fo_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio, in fo_sendfile() argument
409 return ((*fp->f_ops->fo_sendfile)(fp, sockfd, hdr_uio, trl_uio, offset, in fo_sendfile()
414 fo_seek(struct file *fp, off_t offset, int whence, struct thread *td) in fo_seek() argument
417 return ((*fp->f_ops->fo_seek)(fp, offset, whence, td)); in fo_seek()
421 fo_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp) in fo_fill_kinfo() argument
424 return ((*fp->f_ops->fo_fill_kinfo)(fp, kif, fdp)); in fo_fill_kinfo()
428 fo_mmap(struct file *fp, vm_map_t map, vm_offset_t *addr, vm_size_t size, in fo_mmap() argument
433 if (fp->f_ops->fo_mmap == NULL) in fo_mmap()
435 return ((*fp->f_ops->fo_mmap)(fp, map, addr, size, prot, cap_maxprot, in fo_mmap()
440 fo_aio_queue(struct file *fp, struct kaiocb *job) in fo_aio_queue() argument
443 return ((*fp->f_ops->fo_aio_queue)(fp, job)); in fo_aio_queue()
447 fo_add_seals(struct file *fp, int seals) in fo_add_seals() argument
450 if (fp->f_ops->fo_add_seals == NULL) in fo_add_seals()
452 return ((*fp->f_ops->fo_add_seals)(fp, seals)); in fo_add_seals()
456 fo_get_seals(struct file *fp, int *seals) in fo_get_seals() argument
459 if (fp->f_ops->fo_get_seals == NULL) in fo_get_seals()
461 return ((*fp->f_ops->fo_get_seals)(fp, seals)); in fo_get_seals()
465 fo_fallocate(struct file *fp, off_t offset, off_t len, struct thread *td) in fo_fallocate() argument
468 if (fp->f_ops->fo_fallocate == NULL) in fo_fallocate()
470 return ((*fp->f_ops->fo_fallocate)(fp, offset, len, td)); in fo_fallocate()