/freebsd/sys/compat/linuxkpi/common/include/linux/ |
H A D | file.h | 72 &filp->f_count : &filp->_file->f_count)) { in fput() 73 linux_file_free(filp); in fput() 81 filp->f_count : filp->_file->f_count); in file_count() 109 filp->_file = NULL; in fd_install() 111 filp->_file = file; in fd_install() 112 finit(file, filp->f_mode, DTYPE_DEV, filp, &linuxfileops); in fd_install() 120 fput(filp); in fd_install() 158 struct linux_file *filp; in alloc_file() local 161 filp->f_op = fops; in alloc_file() 162 filp->f_mode = mode; in alloc_file() [all …]
|
H A D | fs.h | 119 #define fasync_helper(fd, filp, on, queue) \ argument 122 *(queue) = &(filp)->f_sigio; \ 244 nonseekable_open(struct inode *inode, struct file *filp) in nonseekable_open() argument 250 simple_open(struct inode *inode, struct file *filp) in simple_open() argument 252 filp->private_data = inode->i_private; in simple_open() 379 __fops ## _open(struct inode *inode, struct file *filp) \ 381 return (simple_attr_open(inode, filp, __get, __set, __fmt)); \ 392 int simple_attr_open(struct inode *inode, struct file *filp, 396 int simple_attr_release(struct inode *inode, struct file *filp); 398 ssize_t simple_attr_read(struct file *filp, char *buf, size_t read_size, loff_t *ppos); [all …]
|
/freebsd/sys/compat/linuxkpi/common/src/ |
H A D | linux_compat.c | 397 struct linux_file *filp; in linux_file_alloc() local 399 filp = kzalloc(sizeof(*filp), GFP_KERNEL); in linux_file_alloc() 402 filp->f_count = 1; in linux_file_alloc() 405 spin_lock_init(&filp->f_kqlock); in linux_file_alloc() 406 knlist_init(&filp->f_selinfo.si_note, &filp->f_kqlock, in linux_file_alloc() 409 return (filp); in linux_file_alloc() 413 linux_file_free(struct linux_file *filp) in linux_file_free() argument 415 if (filp in linux_file_free() 683 linux_get_fop(struct linux_file * filp,const struct file_operations ** fop,struct linux_cdev ** dev) linux_get_fop() argument 742 struct linux_file *filp; linux_dev_fdopen() local 911 linux_file_ioctl_sub(struct file * fp,struct linux_file * filp,const struct file_operations * fop,u_long cmd,caddr_t data,struct thread * td) linux_file_ioctl_sub() argument 1003 struct linux_file *filp = container_of(wq, struct linux_file, f_wait_queue.wq); linux_poll_wakeup_callback() local 1015 linux_poll_wait(struct linux_file * filp,wait_queue_head_t * wqh,poll_table * p) linux_poll_wait() argument 1042 linux_poll_wait_dequeue(struct linux_file * filp) linux_poll_wait_dequeue() argument 1065 linux_poll_wakeup(struct linux_file * filp) linux_poll_wakeup() argument 1085 struct linux_file *filp = kn->kn_hook; linux_file_kqfilter_detach() local 1095 struct linux_file *filp = kn->kn_hook; linux_file_kqfilter_read_event() local 1105 struct linux_file *filp = kn->kn_hook; linux_file_kqfilter_write_event() local 1125 linux_file_kqfilter_poll(struct linux_file * filp,int kqflags) linux_file_kqfilter_poll() argument 1162 struct linux_file *filp; linux_file_kqfilter() local 1212 struct linux_file *filp; linux_file_mmap_single() local 1369 struct linux_file *filp; linux_file_read() local 1411 struct linux_file *filp; linux_file_write() local 1454 struct linux_file *filp; linux_file_poll() local 1476 struct linux_file *filp; linux_file_close() local 1519 struct linux_file *filp; linux_file_ioctl() local 1601 struct linux_file *filp; linux_file_mmap() local 1668 struct linux_file *filp; linux_file_stat() local 1689 struct linux_file *filp; linux_file_fill_kinfo() local [all...] |
H A D | linux_simple_attr.c | 57 simple_attr_open(struct inode *inode, struct file *filp, in simple_attr_open() argument 72 filp->private_data = (void *) sattr; in simple_attr_open() 74 return (nonseekable_open(inode, filp)); in simple_attr_open() 78 simple_attr_release(struct inode *inode, struct file *filp) in simple_attr_release() argument 80 free(filp->private_data, M_LSATTR); in simple_attr_release() 102 simple_attr_read(struct file *filp, char *buf, size_t read_size, loff_t *ppos) in simple_attr_read() argument 109 sattr = filp->private_data; in simple_attr_read() 157 simple_attr_write(struct file *filp, const char *buf, size_t write_size, loff_t *ppos) in simple_attr_write() argument 164 sattr = filp->private_data; in simple_attr_write()
|
H A D | linux_shmemfs.c | 70 struct linux_file *filp; in linux_shmem_file_setup() local 79 filp = &fileobj->file; in linux_shmem_file_setup() 82 filp->f_count = 1; in linux_shmem_file_setup() 83 filp->f_vnode = vp; in linux_shmem_file_setup() 84 filp->f_shmem = vm_pager_allocate(OBJT_SWAP, NULL, size, in linux_shmem_file_setup() 86 if (filp->f_shmem == NULL) { in linux_shmem_file_setup() 90 return (filp); in linux_shmem_file_setup() 92 kfree(filp); in linux_shmem_file_setup()
|
/freebsd/sys/contrib/openzfs/module/os/linux/zfs/ |
H A D | zpl_file.c | 61 error = generic_file_open(ip, filp); in zpl_open() 67 error = -zfs_open(ip, filp->f_mode, filp->f_flags, cr); in zpl_open() 120 error = zpl_iterate(filp, &ctx); in zpl_readdir() 121 filp->f_pos = ctx.pos; in zpl_readdir() 276 zpl_file_accessed(struct file *filp) in zpl_file_accessed() argument 282 file_accessed(filp); in zpl_file_accessed() 284 file_accessed(filp); in zpl_file_accessed() 316 struct file *filp = kiocb->ki_filp; in zpl_iter_read() local 337 zpl_file_accessed(filp); in zpl_iter_read() 372 struct file *filp = kiocb->ki_filp; in zpl_iter_write() local [all …]
|
H A D | zfs_ioctl_os.c | 96 struct file *filp = priv; in zfsdev_private_set_state() local 98 filp->private_data = zs; in zfsdev_private_set_state() 104 struct file *filp = priv; in zfsdev_private_get_state() local 106 return (filp->private_data); in zfsdev_private_get_state() 110 zfsdev_open(struct inode *ino, struct file *filp) in zfsdev_open() argument 115 error = zfsdev_state_init(filp); in zfsdev_open() 122 zfsdev_release(struct inode *ino, struct file *filp) in zfsdev_release() argument 124 zfsdev_state_destroy(filp); in zfsdev_release() 130 zfsdev_ioctl(struct file *filp, unsigned cmd, unsigned long arg) in zfsdev_ioctl() argument 222 zfsdev_compat_ioctl(struct file *filp, unsigned cmd, unsigned long arg) in zfsdev_compat_ioctl() argument [all …]
|
H A D | zpl_ctldir.c | 45 if (blk_mode_is_open_write(filp->f_mode)) in zpl_common_open() 48 return (generic_file_open(ip, filp)); in zpl_common_open() 63 if (!zpl_dir_emit_dots(filp, ctx)) in zpl_root_iterate() 95 error = zpl_root_iterate(filp, &ctx); in zpl_root_readdir() 96 filp->f_pos = ctx.pos; in zpl_root_readdir() 274 if (!zpl_dir_emit_dots(filp, ctx)) in zpl_snapdir_iterate() 311 error = zpl_snapdir_iterate(filp, &ctx); in zpl_snapdir_readdir() 312 filp->f_pos = ctx.pos; in zpl_snapdir_readdir() 551 zpl_dir_emit_dots(filp, ctx); in zpl_shares_iterate() 580 error = zpl_shares_iterate(filp, &ctx); in zpl_shares_readdir() [all …]
|
H A D | zfs_file_os.c | 45 struct file *filp; in zfs_file_open() local 54 filp = filp_open(path, flags, mode); in zfs_file_open() 59 if (IS_ERR(filp)) in zfs_file_open() 60 return (-PTR_ERR(filp)); in zfs_file_open() 62 *fpp = filp; in zfs_file_open() 272 zfs_file_getattr(zfs_file_t *filp, zfs_file_attr_t *zfattr) in zfs_file_getattr() argument 278 rc = vfs_getattr(&filp->f_path, &stat, STATX_BASIC_STATS, in zfs_file_getattr() 281 rc = vfs_getattr(&filp->f_path, &stat); in zfs_file_getattr() 283 rc = vfs_getattr(filp->f_path.mnt, filp->f_dentry, &stat); in zfs_file_getattr() 305 zfs_file_fsync(zfs_file_t *filp, int flags) in zfs_file_fsync() argument [all …]
|
/freebsd/sys/ofed/drivers/infiniband/core/ |
H A D | ib_uverbs_main.c | 211 struct file *filp, char __user *buf, in ib_uverbs_event_read() argument 223 if (filp->f_flags & O_NONBLOCK) in ib_uverbs_event_read() 280 filp->private_data; in ib_uverbs_comp_event_read() 288 struct file *filp, in ib_uverbs_event_poll() argument 293 poll_wait(filp, &ev_queue->poll_wait, wait); in ib_uverbs_event_poll() 315 filp->private_data; in ib_uverbs_comp_event_poll() 330 filp->private_data; in ib_uverbs_comp_event_fasync() 559 struct ib_uverbs_file *file = filp->private_data; in ib_uverbs_write() 568 if (!ib_safe_file_access(filp)) { in ib_uverbs_write() 881 filp->private_data = file; in ib_uverbs_open() [all …]
|
H A D | ib_rdma_core.c | 460 struct file *filp; in alloc_begin_fd_uobject() local 475 if (IS_ERR(filp)) { in alloc_begin_fd_uobject() 476 uobj = ERR_CAST(filp); in alloc_begin_fd_uobject() 479 uobj->object = filp; in alloc_begin_fd_uobject() 553 struct file *filp = uobj->object; in alloc_abort_fd_uobject() local 555 fput(filp); in alloc_abort_fd_uobject() 608 filp->private_data = uobj; in alloc_commit_fd_uobject() 609 fd_install(fd, filp); in alloc_commit_fd_uobject() 668 fput(filp); in lookup_put_fd_uobject() 745 if (!filp->private_data) in uverbs_uobject_fd_release() [all …]
|
H A D | ib_user_mad.c | 341 struct ib_umad_file *file = filp->private_data; in ib_umad_read() 353 if (filp->f_flags & O_NONBLOCK) in ib_umad_read() 454 struct ib_umad_file *file = filp->private_data; in ib_umad_write() 614 struct ib_umad_file *file = filp->private_data; in ib_umad_poll() 619 poll_wait(filp, &file->recv_wait, wait); in ib_umad_poll() 959 filp->private_data = file; in ib_umad_open() 963 ret = nonseekable_open(inode, filp); in ib_umad_open() 979 struct ib_umad_file *file = filp->private_data; in ib_umad_close() 1038 if (filp->f_flags & O_NONBLOCK) { in ib_umad_sm_open() 1054 filp->private_data = port; in ib_umad_sm_open() [all …]
|
H A D | ib_ucm.c | 70 struct file *filp; member 405 if (file->filp->f_flags & O_NONBLOCK) in ib_ucm_event() 1104 struct ib_ucm_file *file = filp->private_data; in ib_ucm_write() 1108 if (WARN_ON_ONCE(!ib_safe_file_access(filp))) in ib_ucm_write() 1131 static unsigned int ib_ucm_poll(struct file *filp, in ib_ucm_poll() argument 1134 struct ib_ucm_file *file = filp->private_data; in ib_ucm_poll() 1137 poll_wait(filp, &file->poll_wait, wait); in ib_ucm_poll() 1167 filp->private_data = file; in ib_ucm_open() 1168 file->filp = filp; in ib_ucm_open() 1171 return nonseekable_open(inode, filp); in ib_ucm_open() [all …]
|
H A D | ib_ucma.c | 65 struct file *filp; member 401 if (file->filp->f_flags & O_NONBLOCK) in ucma_get_event() 1611 struct ucma_file *file = filp->private_data; in ucma_write() 1615 if (WARN_ON_ONCE(!ib_safe_file_access(filp))) in ucma_write() 1642 struct ucma_file *file = filp->private_data; in ucma_poll() 1645 poll_wait(filp, &file->poll_wait, wait); in ucma_poll() 1661 static int ucma_open(struct inode *inode, struct file *filp) in ucma_open() argument 1681 filp->private_data = file; in ucma_open() 1682 file->filp = filp; in ucma_open() 1684 return nonseekable_open(inode, filp); in ucma_open() [all …]
|
/freebsd/sys/contrib/dev/rtw88/ |
H A D | debug.c | 22 ssize_t (*cb_write)(struct file *filp, const char __user *buffer, 58 static ssize_t rtw_debugfs_common_write(struct file *filp, in rtw_debugfs_common_write() argument 62 struct rtw_debugfs_priv *debugfs_priv = filp->private_data; in rtw_debugfs_common_write() 64 return debugfs_priv->cb_write(filp, buffer, count, loff); in rtw_debugfs_common_write() 67 static ssize_t rtw_debugfs_single_write(struct file *filp, in rtw_debugfs_single_write() argument 74 return debugfs_priv->cb_write(filp, buffer, count, loff); in rtw_debugfs_single_write() 194 static ssize_t rtw_debugfs_set_read_reg(struct file *filp, in rtw_debugfs_set_read_reg() argument 387 static ssize_t rtw_debugfs_set_h2c(struct file *filp, in rtw_debugfs_set_h2c() argument 417 static ssize_t rtw_debugfs_set_rf_write(struct file *filp, in rtw_debugfs_set_rf_write() argument 449 static ssize_t rtw_debugfs_set_rf_read(struct file *filp, in rtw_debugfs_set_rf_read() argument [all …]
|
/freebsd/sys/contrib/openzfs/module/os/linux/spl/ |
H A D | spl-generic.c | 651 ASSERT(filp); in spl_getattr() 658 rc = vfs_getattr(&filp->f_path, stat); in spl_getattr() 660 rc = vfs_getattr(filp->f_path.mnt, filp->f_dentry, stat); in spl_getattr() 716 struct file *filp; in hostid_read() local 719 filp = filp_open(spl_hostid_path, 0, 0); in hostid_read() 721 if (IS_ERR(filp)) in hostid_read() 724 error = spl_getattr(filp, &stat); in hostid_read() 726 filp_close(filp, 0); in hostid_read() 732 filp_close(filp, 0); in hostid_read() 743 filp_close(filp, 0); in hostid_read() [all …]
|
H A D | spl-procfs-list.c | 169 procfs_list_open(struct inode *inode, struct file *filp) in procfs_list_open() argument 171 int rc = seq_open_private(filp, &procfs_list_seq_ops, in procfs_list_open() 176 struct seq_file *f = filp->private_data; in procfs_list_open() 186 procfs_list_write(struct file *filp, const char __user *buf, size_t len, in procfs_list_write() argument 189 struct seq_file *f = filp->private_data; in procfs_list_write()
|
H A D | spl-proc.c | 476 proc_slab_open(struct inode *inode, struct file *filp) in proc_slab_open() argument 478 return (seq_open(filp, &slab_seq_ops)); in proc_slab_open() 516 proc_taskq_all_open(struct inode *inode, struct file *filp) in proc_taskq_all_open() argument 518 return (seq_open(filp, &taskq_all_seq_ops)); in proc_taskq_all_open() 522 proc_taskq_open(struct inode *inode, struct file *filp) in proc_taskq_open() argument 524 return (seq_open(filp, &taskq_seq_ops)); in proc_taskq_open()
|
/freebsd/sys/ofed/include/rdma/ |
H A D | ib.h | 109 static inline bool ib_safe_file_access(struct file *filp) in ib_safe_file_access() argument 117 return (filp->_file != NULL && in ib_safe_file_access() 118 filp->_file == td->td_fpop && in ib_safe_file_access() 119 filp->_file->f_cred == td->td_ucred); in ib_safe_file_access()
|
/freebsd/sys/dev/drm2/ |
H A D | drm_gem.c | 171 drm_gem_remove_prime_handles(struct drm_gem_object *obj, struct drm_file *filp) in drm_gem_remove_prime_handles() argument 174 drm_prime_remove_buf_handle(&filp->prime, in drm_gem_remove_prime_handles() 178 drm_prime_remove_buf_handle(&filp->prime, in drm_gem_remove_prime_handles() 188 drm_gem_handle_delete(struct drm_file *filp, u32 handle) in drm_gem_handle_delete() argument 193 obj = drm_gem_names_remove(&filp->object_names, handle); in drm_gem_handle_delete() 200 drm_gem_remove_prime_handles(obj, filp); in drm_gem_handle_delete() 204 dev->driver->gem_close_object(obj, filp); in drm_gem_handle_delete() 284 drm_gem_object_lookup(struct drm_device *dev, struct drm_file *filp, in drm_gem_object_lookup() argument 289 obj = drm_gem_name_ref(&filp->object_names, handle, in drm_gem_object_lookup()
|
/freebsd/sys/dev/netmap/ |
H A D | netmap_kloop.c | 451 struct file *filp; member 490 entry->filp = file; in sync_kloop_poll_table_queue_proc() 738 filp = eventfd_fget( in netmap_sync_kloop() 740 if (IS_ERR(filp)) { in netmap_sync_kloop() 741 err = PTR_ERR(filp); in netmap_sync_kloop() 763 filp = eventfd_fget( in netmap_sync_kloop() 765 if (IS_ERR(filp)) { in netmap_sync_kloop() 766 err = PTR_ERR(filp); in netmap_sync_kloop() 783 mask = filp->f_op->poll(filp, in netmap_sync_kloop() 884 if (entry->filp && entry->filp != priv->np_filp) in netmap_sync_kloop() [all …]
|
/freebsd/sys/contrib/openzfs/include/os/linux/kernel/linux/ |
H A D | vfs_compat.h | 152 struct file *filp, in lseek_execute() argument 157 if (offset < 0 && !(filp->f_mode & FMODE_UNSIGNED_OFFSET)) in lseek_execute() 163 if (offset != filp->f_pos) { in lseek_execute() 164 spin_lock(&filp->f_lock); in lseek_execute() 165 filp->f_pos = offset; in lseek_execute() 166 filp->f_version = 0; in lseek_execute() 167 spin_unlock(&filp->f_lock); in lseek_execute()
|
/freebsd/sys/contrib/openzfs/config/ |
H A D | kernel-vfs-rw-iterate.m4 | 24 struct file *filp = NULL; 30 ret = new_sync_read(filp, rbuf, len, &ppos); 31 ret = new_sync_write(filp, wbuf, len, &ppos);
|
H A D | kernel-vfs-iterate.m4 | 4 static int iterate(struct file *filp, struct dir_context * context) 15 static int iterate(struct file *filp, 30 static int readdir(struct file *filp, void *entry,
|
/freebsd/sys/contrib/dev/rtw89/ |
H A D | debug.c | 87 static ssize_t rtw89_debugfs_single_write(struct file *filp, in rtw89_debugfs_single_write() argument 91 struct rtw89_debugfs_priv *debugfs_priv = filp->private_data; in rtw89_debugfs_single_write() 93 return debugfs_priv->cb_write(filp, buffer, count, loff); in rtw89_debugfs_single_write() 96 static ssize_t rtw89_debugfs_seq_file_write(struct file *filp, in rtw89_debugfs_seq_file_write() argument 103 return debugfs_priv->cb_write(filp, buffer, count, loff); in rtw89_debugfs_seq_file_write() 141 rtw89_debug_priv_read_reg_select(struct file *filp, in rtw89_debug_priv_read_reg_select() argument 145 struct seq_file *m = (struct seq_file *)filp->private_data; in rtw89_debug_priv_read_reg_select() 263 rtw89_debug_priv_read_rf_select(struct file *filp, in rtw89_debug_priv_read_rf_select() argument 267 struct seq_file *m = (struct seq_file *)filp->private_data; in rtw89_debug_priv_read_rf_select() 660 rtw89_debug_priv_mac_reg_dump_select(struct file *filp, in rtw89_debug_priv_mac_reg_dump_select() argument [all …]
|