| /linux-6.15/fs/ |
| H A D | fcntl.c | 67 if (filp->f_op->check_flags) in setfl() 75 if (((arg ^ filp->f_flags) & FASYNC) && filp->f_op->fasync) { in setfl() 76 error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0); in setfl() 82 spin_lock(&filp->f_lock); in setfl() 83 filp->f_flags = (arg & SETFL_MASK) | (filp->f_flags & ~SETFL_MASK); in setfl() 84 filp->f_iocb_flags = iocb_flags(filp); in setfl() 85 spin_unlock(&filp->f_lock); in setfl() 447 struct file *filp) in do_fcntl() argument 475 err = filp->f_flags; in do_fcntl() 511 err = f_getown(filp); in do_fcntl() [all …]
|
| H A D | locks.c | 469 fl->c.flc_file = filp; in flock_make_lock() 1453 f_delown(filp); in lease_modify() 1989 return filp->f_op->setlease(filp, arg, lease, priv); in kernel_setlease() 2068 return vfs_setlease(filp, F_UNLCK, NULL, (void **)&filp); in fcntl_setlease() 2197 return filp->f_op->lock(filp, F_GETLK, fl); in vfs_test_lock() 2353 return filp->f_op->lock(filp, cmd, fl); in vfs_lock_file() 2466 if (f != filp) { in fcntl_setlk() 2588 if (f != filp) { in fcntl_setlk64() 2653 filp->f_op->flock(filp, F_SETLKW, &fl); in locks_remove_flock() 2694 locks_remove_posix(filp, filp); in locks_remove_file() [all …]
|
| H A D | ioctl.c | 48 if (!filp->f_op->unlocked_ioctl) in vfs_ioctl() 51 error = filp->f_op->unlocked_ioctl(filp, cmd, arg); in vfs_ioctl() 83 sb->s_id, filp); in ioctl_fibmap() 281 sr.l_start += filp->f_pos; in ioctl_preallocate() 355 spin_lock(&filp->f_lock); in ioctl_fionbio() 357 filp->f_flags |= flag; in ioctl_fionbio() 359 filp->f_flags &= ~flag; in ioctl_fionbio() 360 spin_unlock(&filp->f_lock); in ioctl_fionbio() 377 if (filp->f_op->fasync) in ioctl_fioasync() 379 error = filp->f_op->fasync(fd, filp, on); in ioctl_fioasync() [all …]
|
| /linux-6.15/drivers/media/mc/ |
| H A D | mc-devnode.c | 73 struct media_devnode *devnode = media_devnode_data(filp); in media_read() 79 return devnode->fops->read(filp, buf, sz, off); in media_read() 91 return devnode->fops->write(filp, buf, sz, off); in media_write() 94 static __poll_t media_poll(struct file *filp, in media_poll() argument 103 return devnode->fops->poll(filp, poll); in media_poll() 119 return ioctl_func(filp, cmd, arg); in __media_ioctl() 165 filp->private_data = devnode; in media_open() 168 ret = devnode->fops->open(filp); in media_open() 171 filp->private_data = NULL; in media_open() 185 devnode->fops->release(filp); in media_release() [all …]
|
| /linux-6.15/drivers/net/ethernet/amd/xgbe/ |
| H A D | xgbe-debugfs.c | 177 struct xgbe_prv_data *pdata = filp->private_data; in xgmac_reg_addr_read() 186 struct xgbe_prv_data *pdata = filp->private_data; in xgmac_reg_addr_write() 195 struct xgbe_prv_data *pdata = filp->private_data; in xgmac_reg_value_read() 207 struct xgbe_prv_data *pdata = filp->private_data; in xgmac_reg_value_write() 237 struct xgbe_prv_data *pdata = filp->private_data; in xpcs_mmd_read() 245 struct xgbe_prv_data *pdata = filp->private_data; in xpcs_mmd_write() 254 struct xgbe_prv_data *pdata = filp->private_data; in xpcs_reg_addr_read() 262 struct xgbe_prv_data *pdata = filp->private_data; in xpcs_reg_addr_write() 271 struct xgbe_prv_data *pdata = filp->private_data; in xpcs_reg_value_read() 284 struct xgbe_prv_data *pdata = filp->private_data; in xpcs_reg_value_write() [all …]
|
| /linux-6.15/net/handshake/ |
| H A D | handshake-test.c | 212 struct file *filp; in handshake_req_submit_test4() local 225 sock->file = filp; in handshake_req_submit_test4() 238 fput(filp); in handshake_req_submit_test4() 246 struct file *filp; in handshake_req_submit_test5() local 260 sock->file = filp; in handshake_req_submit_test5() 275 fput(filp); in handshake_req_submit_test5() 283 struct file *filp; in handshake_req_submit_test6() local 309 fput(filp); in handshake_req_submit_test6() 343 fput(filp); in handshake_req_cancel_test1() 385 fput(filp); in handshake_req_cancel_test2() [all …]
|
| /linux-6.15/fs/9p/ |
| H A D | vfs_file.c | 106 struct inode *inode = file_inode(filp); in v9fs_file_lock() 126 fid = filp->private_data; in v9fs_file_do_lock() 131 res = locks_lock_file_wait(filp, fl); in v9fs_file_do_lock() 214 locks_lock_file_wait(filp, fl); in v9fs_file_do_lock() 229 fid = filp->private_data; in v9fs_file_getlock() 232 posix_test_lock(filp, fl); in v9fs_file_getlock() 294 filp, cmd, fl, filp); in v9fs_file_lock_dotl() 304 ret = v9fs_file_getlock(filp, fl); in v9fs_file_lock_dotl() 325 filp, cmd, fl, filp); in v9fs_file_flock_dotl() 425 fid = filp->private_data; in v9fs_file_fsync() [all …]
|
| /linux-6.15/fs/nfs/ |
| H A D | file.c | 69 res = nfs_check_flags(filp->f_flags); in nfs_file_open() 73 res = nfs_open(inode, filp); in nfs_file_open() 75 filp->f_mode |= FMODE_CAN_ODIRECT; in nfs_file_open() 82 dprintk("NFS: release(%pD2)\n", filp); in nfs_file_release() 85 nfs_file_clear_open_context(filp); in nfs_file_release() 86 nfs_fscache_release_file(inode, filp); in nfs_file_release() 106 if (filp->f_flags & O_DIRECT) in nfs_revalidate_file_size() 118 filp, offset, whence); in nfs_file_llseek() 599 filp, filp->f_mapping->host->i_ino, in nfs_vm_page_mkwrite() 737 posix_test_lock(filp, fl); in do_getlk() [all …]
|
| /linux-6.15/drivers/net/ethernet/marvell/octeontx2/af/ |
| H A D | rvu_debugfs.c | 203 struct mcs *mcs = filp->private; in rvu_dbg_mcs_port_stats_display() 207 seq_puts(filp, "\n port stats\n"); in rvu_dbg_mcs_port_stats_display() 241 struct mcs *mcs = filp->private; in rvu_dbg_mcs_sa_stats_display() 294 struct mcs *mcs = filp->private; in rvu_dbg_mcs_tx_sc_stats_display() 300 seq_puts(filp, "\n SC stats\n"); in rvu_dbg_mcs_tx_sc_stats_display() 324 struct mcs *mcs = filp->private; in rvu_dbg_mcs_rx_sc_stats_display() 330 seq_puts(filp, "\n SC stats\n"); in rvu_dbg_mcs_rx_sc_stats_display() 361 struct mcs *mcs = filp->private; in rvu_dbg_mcs_flowid_stats_display() 398 struct mcs *mcs = filp->private; in rvu_dbg_mcs_tx_secy_stats_display() 441 struct mcs *mcs = filp->private; in rvu_dbg_mcs_rx_secy_stats_display() [all …]
|
| /linux-6.15/arch/x86/kernel/ |
| H A D | sys_x86_64.c | 29 static unsigned long get_align_mask(struct file *filp) in get_align_mask() argument 31 if (filp && is_file_hugepages(filp)) in get_align_mask() 32 return huge_page_mask_align(filp); in get_align_mask() 154 if (!(filp && is_file_hugepages(filp))) { in arch_get_unmapped_area() 158 if (filp) { in arch_get_unmapped_area() 159 info.align_mask = get_align_mask(filp); in arch_get_unmapped_area() 167 arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr0, in arch_get_unmapped_area_topdown() argument 208 if (!(filp && is_file_hugepages(filp))) { in arch_get_unmapped_area_topdown() 223 if (filp) { in arch_get_unmapped_area_topdown() 224 info.align_mask = get_align_mask(filp); in arch_get_unmapped_area_topdown() [all …]
|
| /linux-6.15/drivers/usb/gadget/function/ |
| H A D | u_uac1_legacy.c | 212 if (IS_ERR(snd->filp)) { in gaudio_open_snd_dev() 216 snd->filp = NULL; in gaudio_open_snd_dev() 224 if (IS_ERR(snd->filp)) { in gaudio_open_snd_dev() 228 snd->filp = NULL; in gaudio_open_snd_dev() 239 if (IS_ERR(snd->filp)) { in gaudio_open_snd_dev() 243 snd->filp = NULL; in gaudio_open_snd_dev() 262 if (snd->filp) in gaudio_close_snd_dev() 263 filp_close(snd->filp, NULL); in gaudio_close_snd_dev() 267 if (snd->filp) in gaudio_close_snd_dev() 268 filp_close(snd->filp, NULL); in gaudio_close_snd_dev() [all …]
|
| H A D | storage_common.c | 171 if (curlun->filp) { in fsg_lun_close() 173 fput(curlun->filp); in fsg_lun_close() 174 curlun->filp = NULL; in fsg_lun_close() 195 if (PTR_ERR(filp) == -EROFS || PTR_ERR(filp) == -EACCES) in fsg_lun_open() 200 if (IS_ERR(filp)) { in fsg_lun_open() 202 return PTR_ERR(filp); in fsg_lun_open() 266 curlun->filp = filp; in fsg_lun_open() 273 fput(filp); in fsg_lun_open() 287 struct file *filp = curlun->filp; in fsg_lun_fsync_sub() local 289 if (curlun->ro || !filp) in fsg_lun_fsync_sub() [all …]
|
| /linux-6.15/net/qrtr/ |
| H A D | tun.c | 31 static int qrtr_tun_open(struct inode *inode, struct file *filp) in qrtr_tun_open() argument 45 filp->private_data = tun; in qrtr_tun_open() 54 filp->private_data = NULL; in qrtr_tun_open() 61 struct file *filp = iocb->ki_filp; in qrtr_tun_read_iter() local 62 struct qrtr_tun *tun = filp->private_data; in qrtr_tun_read_iter() 67 if (filp->f_flags & O_NONBLOCK) in qrtr_tun_read_iter() 87 struct file *filp = iocb->ki_filp; in qrtr_tun_write_iter() local 88 struct qrtr_tun *tun = filp->private_data; in qrtr_tun_write_iter() 116 struct qrtr_tun *tun = filp->private_data; in qrtr_tun_poll() 119 poll_wait(filp, &tun->readq, wait); in qrtr_tun_poll() [all …]
|
| /linux-6.15/include/linux/ |
| H A D | fsverity.h | 45 int (*begin_enable_verity)(struct file *filp); 67 int (*end_enable_verity)(struct file *filp, const void *desc, 140 int fsverity_ioctl_enable(struct file *filp, const void __user *arg); 144 int fsverity_ioctl_measure(struct file *filp, void __user *arg); 151 int __fsverity_file_open(struct inode *inode, struct file *filp); 169 int fsverity_ioctl_read_metadata(struct file *filp, const void __user *uarg); 186 static inline int fsverity_ioctl_enable(struct file *filp, in fsverity_ioctl_enable() argument 194 static inline int fsverity_ioctl_measure(struct file *filp, void __user *arg) in fsverity_ioctl_measure() argument 229 static inline int fsverity_ioctl_read_metadata(struct file *filp, in fsverity_ioctl_read_metadata() argument 297 static inline int fsverity_file_open(struct inode *inode, struct file *filp) in fsverity_file_open() argument [all …]
|
| H A D | filelock.h | 160 int fcntl_setlease(unsigned int fd, struct file *filp, int arg); 161 int fcntl_getlease(struct file *filp); 203 int vfs_cancel_lock(struct file *filp, struct file_lock *fl); 223 struct file *filp, struct files_struct *files); 264 static inline int fcntl_getlease(struct file *filp) in fcntl_getlease() argument 318 static inline void locks_remove_file(struct file *filp) in locks_remove_file() argument 376 static inline int generic_setlease(struct file *filp, int arg, in generic_setlease() argument 382 static inline int kernel_setlease(struct file *filp, int arg, in kernel_setlease() argument 388 static inline int vfs_setlease(struct file *filp, int arg, in vfs_setlease() argument 402 struct file *filp, struct files_struct *files) {} in show_fd_locks() argument [all …]
|
| /linux-6.15/drivers/gpu/drm/amd/amdgpu/ |
| H A D | amdgpu_gem.h | 52 int amdgpu_mode_dumb_mmap(struct drm_file *filp, 57 struct drm_file *filp); 59 struct drm_file *filp); 61 struct drm_file *filp); 63 struct drm_file *filp); 65 struct drm_file *filp); 68 struct drm_file *filp); 70 struct drm_file *filp); 73 struct drm_file *filp);
|
| /linux-6.15/drivers/platform/x86/amd/pmc/ |
| H A D | mp1_stb.c | 95 struct amd_pmc_dev *dev = filp->f_inode->i_private; in amd_stb_debugfs_open() 110 filp->private_data = buf; in amd_stb_debugfs_open() 116 if (!filp->private_data) in amd_stb_debugfs_read() 125 kfree(filp->private_data); in amd_stb_debugfs_release() 137 static int amd_stb_handle_efr(struct file *filp) in amd_stb_handle_efr() argument 139 struct amd_pmc_dev *dev = filp->f_inode->i_private; in amd_stb_handle_efr() 150 filp->private_data = stb_data_arr; in amd_stb_handle_efr() 157 struct amd_pmc_dev *dev = filp->f_inode->i_private; in amd_stb_debugfs_open_v2() 180 return amd_stb_handle_efr(filp); in amd_stb_debugfs_open_v2() 215 filp->private_data = stb_data_arr; in amd_stb_debugfs_open_v2() [all …]
|
| /linux-6.15/fs/f2fs/ |
| H A D | file.c | 2293 mnt_drop_write_file(filp); in f2fs_ioc_start_atomic_write() 2328 mnt_drop_write_file(filp); in f2fs_ioc_commit_atomic_write() 2354 mnt_drop_write_file(filp); in f2fs_ioc_abort_atomic_write() 2537 mnt_drop_write_file(filp); in f2fs_ioc_fitrim() 2610 mnt_drop_write_file(filp); in f2fs_ioc_get_encryption_pwsalt() 2707 mnt_drop_write_file(filp); in f2fs_ioc_gc() 2759 mnt_drop_write_file(filp); in __f2fs_ioc_gc_range() 2796 mnt_drop_write_file(filp); in f2fs_ioc_write_checkpoint() 2801 struct file *filp, in f2fs_defragment_range() argument 2997 mnt_drop_write_file(filp); in f2fs_ioc_defragment() [all …]
|
| /linux-6.15/net/sunrpc/ |
| H A D | cache.c | 981 poll_wait(filp, &queue_wait, wait); in cache_poll() 1037 nonseekable_open(inode, filp); in cache_open() 1038 if (filp->f_mode & FMODE_READ) { in cache_open() 1051 if (filp->f_mode & FMODE_WRITE) in cache_open() 1053 filp->private_data = rp; in cache_open() 1078 filp->private_data = NULL; in cache_release() 1082 if (filp->f_mode & FMODE_WRITE) { in cache_release() 1575 return cache_poll(filp, wait, cd); in cache_poll_procfs() 1591 return cache_open(inode, filp, cd); in cache_open_procfs() 1635 return open_flush(inode, filp, cd); in open_flush_procfs() [all …]
|
| /linux-6.15/arch/s390/mm/ |
| H A D | mmap.c | 68 static int get_align_mask(struct file *filp, unsigned long flags) in get_align_mask() argument 70 if (filp && is_file_hugepages(filp)) in get_align_mask() 71 return huge_page_mask_align(filp); in get_align_mask() 74 if (filp || (flags & MAP_SHARED)) in get_align_mask() 79 unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, in arch_get_unmapped_area() argument 104 info.align_mask = get_align_mask(filp, flags); in arch_get_unmapped_area() 105 if (!(filp && is_file_hugepages(filp))) in arch_get_unmapped_area() 115 unsigned long arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, in arch_get_unmapped_area_topdown() argument 143 info.align_mask = get_align_mask(filp, flags); in arch_get_unmapped_area_topdown() 144 if (!(filp && is_file_hugepages(filp))) in arch_get_unmapped_area_topdown()
|
| /linux-6.15/fs/verity/ |
| H A D | enable.c | 76 struct inode *inode = file_inode(filp); in build_merkle_tree() 186 struct inode *inode = file_inode(filp); in enable_verity() 238 err = vops->begin_enable_verity(filp); in enable_verity() 320 struct inode *inode = file_inode(filp); in fsverity_ioctl_enable() 350 err = file_permission(filp, MAY_WRITE); in fsverity_ioctl_enable() 358 if (!(filp->f_mode & FMODE_READ)) in fsverity_ioctl_enable() 370 err = mnt_want_write_file(filp); in fsverity_ioctl_enable() 374 err = deny_write_access(filp); in fsverity_ioctl_enable() 378 err = enable_verity(filp, &arg); in fsverity_ioctl_enable() 400 allow_write_access(filp); in fsverity_ioctl_enable() [all …]
|
| /linux-6.15/drivers/media/platform/qcom/iris/ |
| H A D | iris_vidc.c | 126 int iris_open(struct file *filp) in iris_open() argument 128 struct iris_core *core = video_drvdata(filp); in iris_open() 188 filp->private_data = &inst->fh; in iris_open() 224 int iris_close(struct file *filp) in iris_close() argument 226 struct iris_inst *inst = iris_get_inst(filp, NULL); in iris_close() 243 filp->private_data = NULL; in iris_close() 250 struct iris_inst *inst = iris_get_inst(filp, NULL); in iris_enum_fmt() 260 struct iris_inst *inst = iris_get_inst(filp, NULL); in iris_try_fmt_vid_mplane() 272 struct iris_inst *inst = iris_get_inst(filp, NULL); in iris_s_fmt_vid_mplane() 284 struct iris_inst *inst = iris_get_inst(filp, NULL); in iris_g_fmt_vid_mplane() [all …]
|
| /linux-6.15/drivers/vfio/pci/qat/ |
| H A D | main.c | 40 struct file *filp; member 86 migf->filp->f_pos = 0; in qat_vf_disable_fd() 177 offs = &filp->f_pos; in qat_vf_save_read() 276 stream_open(migf->filp->f_inode, migf->filp); in qat_vf_save_device_data() 284 fput(migf->filp); in qat_vf_save_device_data() 304 offs = &filp->f_pos; in qat_vf_resume_write() 368 stream_open(migf->filp->f_inode, migf->filp); in qat_vf_resume_device_data() 417 get_file(migf->filp); in qat_vf_pci_step_device_state() 419 return migf->filp; in qat_vf_pci_step_device_state() 430 return migf->filp; in qat_vf_pci_step_device_state() [all …]
|
| /linux-6.15/drivers/dax/ |
| H A D | device.c | 80 struct file *filp = vmf->vma->vm_file; in dax_set_mapping() local 81 struct dev_dax *dev_dax = filp->private_data; in dax_set_mapping() 97 folio->mapping = filp->f_mapping; in dax_set_mapping() 235 struct file *filp = vmf->vma->vm_file; in dev_dax_huge_fault() local 266 struct file *filp = vma->vm_file; in dev_dax_may_split() local 276 struct file *filp = vma->vm_file; in dev_dax_pagesize() local 317 struct dev_dax *dev_dax = filp ? filp->private_data : NULL; in dax_get_unmapped_area() 358 filp->f_mapping = inode->i_mapping; in dax_open() 359 filp->f_wb_err = filemap_sample_wb_err(filp->f_mapping); in dax_open() 360 filp->f_sb_err = file_sample_sb_err(filp); in dax_open() [all …]
|
| /linux-6.15/drivers/rapidio/devices/ |
| H A D | rio_mport_cdev.c | 109 struct file *filp; member 131 struct file *filp; member 384 map->filp = filp; in rio_mport_create_outbound_mapping() 479 if (map->filp == filp) { in rio_mport_obw_free() 837 req->filp = filp; in rio_dma_transfer() 1106 map->filp = filp; in rio_mport_create_dma_mapping() 1159 map->filp == filp) { in rio_mport_free_dma() 1233 map->filp = filp; in rio_mport_create_inbound_mapping() 1310 if (ret == 0 && mapping->filp == filp) { in rio_mport_map_inbound() 1345 if (map->filp == filp) { in rio_mport_inbound_free() [all …]
|