Home
last modified time | relevance | path

Searched refs:filp (Results 1 – 25 of 720) sorted by relevance

12345678910>>...29

/Linux-v6.1/fs/
Dfcntl.c36 static int setfl(int fd, struct file * filp, unsigned long arg) in setfl() argument
38 struct inode * inode = file_inode(filp); in setfl()
45 if (((arg ^ filp->f_flags) & O_APPEND) && IS_APPEND(inode)) in setfl()
49 if ((arg & O_NOATIME) && !(filp->f_flags & O_NOATIME)) in setfl()
50 if (!inode_owner_or_capable(file_mnt_user_ns(filp), inode)) in setfl()
61 !(filp->f_mode & FMODE_CAN_ODIRECT)) in setfl()
64 if (filp->f_op->check_flags) in setfl()
65 error = filp->f_op->check_flags(arg); in setfl()
72 if (((arg ^ filp->f_flags) & FASYNC) && filp->f_op->fasync) { in setfl()
73 error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0); in setfl()
[all …]
Dioctl.c44 long vfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in vfs_ioctl() argument
48 if (!filp->f_op->unlocked_ioctl) in vfs_ioctl()
51 error = filp->f_op->unlocked_ioctl(filp, cmd, arg); in vfs_ioctl()
59 static int ioctl_fibmap(struct file *filp, int __user *p) in ioctl_fibmap() argument
61 struct inode *inode = file_inode(filp); in ioctl_fibmap()
83 sb->s_id, filp); in ioctl_fibmap()
199 static int ioctl_fiemap(struct file *filp, struct fiemap __user *ufiemap) in ioctl_fiemap() argument
203 struct inode *inode = file_inode(filp); in ioctl_fiemap()
269 static int ioctl_preallocate(struct file *filp, int mode, void __user *argp) in ioctl_preallocate() argument
271 struct inode *inode = file_inode(filp); in ioctl_preallocate()
[all …]
Dlocks.c232 locks_check_ctx_file_list(struct file *filp, struct list_head *list, in locks_check_ctx_file_list() argument
236 struct inode *inode = locks_inode(filp); in locks_check_ctx_file_list()
239 if (fl->fl_file == filp) in locks_check_ctx_file_list()
428 static void flock_make_lock(struct file *filp, struct file_lock *fl, int type) in flock_make_lock() argument
432 fl->fl_file = filp; in flock_make_lock()
433 fl->fl_owner = filp; in flock_make_lock()
454 static int flock64_to_posix_lock(struct file *filp, struct file_lock *fl, in flock64_to_posix_lock() argument
462 fl->fl_start = filp->f_pos; in flock64_to_posix_lock()
465 fl->fl_start = i_size_read(file_inode(filp)); in flock64_to_posix_lock()
493 fl->fl_file = filp; in flock64_to_posix_lock()
[all …]
/Linux-v6.1/drivers/media/mc/
Dmc-devnode.c70 static ssize_t media_read(struct file *filp, char __user *buf, in media_read() argument
73 struct media_devnode *devnode = media_devnode_data(filp); in media_read()
79 return devnode->fops->read(filp, buf, sz, off); in media_read()
82 static ssize_t media_write(struct file *filp, const char __user *buf, in media_write() argument
85 struct media_devnode *devnode = media_devnode_data(filp); in media_write()
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
97 struct media_devnode *devnode = media_devnode_data(filp); in media_poll()
103 return devnode->fops->poll(filp, poll); in media_poll()
107 __media_ioctl(struct file *filp, unsigned int cmd, unsigned long arg, in __media_ioctl() argument
[all …]
/Linux-v6.1/drivers/net/ethernet/amd/xgbe/
Dxgbe-debugfs.c174 static ssize_t xgmac_reg_addr_read(struct file *filp, char __user *buffer, in xgmac_reg_addr_read() argument
177 struct xgbe_prv_data *pdata = filp->private_data; in xgmac_reg_addr_read()
182 static ssize_t xgmac_reg_addr_write(struct file *filp, in xgmac_reg_addr_write() argument
186 struct xgbe_prv_data *pdata = filp->private_data; in xgmac_reg_addr_write()
192 static ssize_t xgmac_reg_value_read(struct file *filp, char __user *buffer, in xgmac_reg_value_read() argument
195 struct xgbe_prv_data *pdata = filp->private_data; in xgmac_reg_value_read()
203 static ssize_t xgmac_reg_value_write(struct file *filp, in xgmac_reg_value_write() argument
207 struct xgbe_prv_data *pdata = filp->private_data; in xgmac_reg_value_write()
234 static ssize_t xpcs_mmd_read(struct file *filp, char __user *buffer, in xpcs_mmd_read() argument
237 struct xgbe_prv_data *pdata = filp->private_data; in xpcs_mmd_read()
[all …]
/Linux-v6.1/drivers/net/ethernet/marvell/octeontx2/af/
Drvu_debugfs.c229 static void print_nix_qsize(struct seq_file *filp, struct rvu_pfvf *pfvf);
231 static int rvu_dbg_mcs_port_stats_display(struct seq_file *filp, void *unused, int dir) in rvu_dbg_mcs_port_stats_display() argument
233 struct mcs *mcs = filp->private; in rvu_dbg_mcs_port_stats_display()
237 seq_puts(filp, "\n port stats\n"); in rvu_dbg_mcs_port_stats_display()
241 seq_printf(filp, "port%d: Tcam Miss: %lld\n", lmac, stats.tcam_miss_cnt); in rvu_dbg_mcs_port_stats_display()
242 seq_printf(filp, "port%d: Parser errors: %lld\n", lmac, stats.parser_err_cnt); in rvu_dbg_mcs_port_stats_display()
245 seq_printf(filp, "port%d: Preempt error: %lld\n", lmac, in rvu_dbg_mcs_port_stats_display()
248 seq_printf(filp, "port%d: Sectag insert error: %lld\n", lmac, in rvu_dbg_mcs_port_stats_display()
255 static int rvu_dbg_mcs_rx_port_stats_display(struct seq_file *filp, void *unused) in rvu_dbg_mcs_rx_port_stats_display() argument
257 return rvu_dbg_mcs_port_stats_display(filp, unused, MCS_RX); in rvu_dbg_mcs_rx_port_stats_display()
[all …]
/Linux-v6.1/fs/nfs/
Dfile.c60 nfs_file_open(struct inode *inode, struct file *filp) in nfs_file_open() argument
64 dprintk("NFS: open file(%pD2)\n", filp); in nfs_file_open()
67 res = nfs_check_flags(filp->f_flags); in nfs_file_open()
71 res = nfs_open(inode, filp); in nfs_file_open()
73 filp->f_mode |= FMODE_CAN_ODIRECT; in nfs_file_open()
78 nfs_file_release(struct inode *inode, struct file *filp) in nfs_file_release() argument
80 dprintk("NFS: release(%pD2)\n", filp); in nfs_file_release()
83 nfs_file_clear_open_context(filp); in nfs_file_release()
84 nfs_fscache_release_file(inode, filp); in nfs_file_release()
100 static int nfs_revalidate_file_size(struct inode *inode, struct file *filp) in nfs_revalidate_file_size() argument
[all …]
/Linux-v6.1/fs/9p/
Dvfs_file.c117 static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_lock() argument
119 struct inode *inode = file_inode(filp); in v9fs_file_lock()
121 p9_debug(P9_DEBUG_VFS, "filp: %p lock: %p\n", filp, fl); in v9fs_file_lock()
131 static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_do_lock() argument
140 fid = filp->private_data; in v9fs_file_do_lock()
145 res = locks_lock_file_wait(filp, fl); in v9fs_file_do_lock()
173 v9ses = v9fs_inode2v9ses(file_inode(filp)); in v9fs_file_do_lock()
227 locks_lock_file_wait(filp, fl); in v9fs_file_do_lock()
236 static int v9fs_file_getlock(struct file *filp, struct file_lock *fl) in v9fs_file_getlock() argument
242 fid = filp->private_data; in v9fs_file_getlock()
[all …]
/Linux-v6.1/drivers/usb/gadget/function/
Du_uac1_legacy.c211 snd->filp = filp_open(fn_cntl, O_RDWR, 0); in gaudio_open_snd_dev()
212 if (IS_ERR(snd->filp)) { in gaudio_open_snd_dev()
213 int ret = PTR_ERR(snd->filp); in gaudio_open_snd_dev()
216 snd->filp = NULL; in gaudio_open_snd_dev()
223 snd->filp = filp_open(fn_play, O_WRONLY, 0); in gaudio_open_snd_dev()
224 if (IS_ERR(snd->filp)) { in gaudio_open_snd_dev()
225 int ret = PTR_ERR(snd->filp); in gaudio_open_snd_dev()
228 snd->filp = NULL; in gaudio_open_snd_dev()
231 pcm_file = snd->filp->private_data; in gaudio_open_snd_dev()
238 snd->filp = filp_open(fn_cap, O_RDONLY, 0); in gaudio_open_snd_dev()
[all …]
Dstorage_common.c170 if (curlun->filp) { in fsg_lun_close()
172 fput(curlun->filp); in fsg_lun_close()
173 curlun->filp = NULL; in fsg_lun_close()
181 struct file *filp = NULL; in fsg_lun_open() local
193 filp = filp_open(filename, O_RDWR | O_LARGEFILE, 0); in fsg_lun_open()
194 if (PTR_ERR(filp) == -EROFS || PTR_ERR(filp) == -EACCES) in fsg_lun_open()
198 filp = filp_open(filename, O_RDONLY | O_LARGEFILE, 0); in fsg_lun_open()
199 if (IS_ERR(filp)) { in fsg_lun_open()
201 return PTR_ERR(filp); in fsg_lun_open()
204 if (!(filp->f_mode & FMODE_WRITE)) in fsg_lun_open()
[all …]
/Linux-v6.1/net/qrtr/
Dtun.c31 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()
114 static __poll_t qrtr_tun_poll(struct file *filp, poll_table *wait) in qrtr_tun_poll() argument
116 struct qrtr_tun *tun = filp->private_data; in qrtr_tun_poll()
[all …]
/Linux-v6.1/drivers/gpu/drm/amd/amdgpu/
Damdgpu_gem.h51 int amdgpu_mode_dumb_mmap(struct drm_file *filp,
56 struct drm_file *filp);
58 struct drm_file *filp);
60 struct drm_file *filp);
62 struct drm_file *filp);
64 struct drm_file *filp);
67 struct drm_file *filp);
69 struct drm_file *filp);
72 struct drm_file *filp);
/Linux-v6.1/fs/verity/
Denable.c43 static int build_merkle_tree_level(struct file *filp, unsigned int level, in build_merkle_tree_level() argument
49 struct inode *inode = file_inode(filp); in build_merkle_tree_level()
68 file_ra_state_init(&ra, filp->f_mapping); in build_merkle_tree_level()
79 src_page = read_file_data_page(filp, i, &ra, in build_merkle_tree_level()
150 static int build_merkle_tree(struct file *filp, in build_merkle_tree() argument
154 struct inode *inode = file_inode(filp); in build_merkle_tree()
182 err = build_merkle_tree_level(filp, level, blocks, params, in build_merkle_tree()
197 static int enable_verity(struct file *filp, in enable_verity() argument
200 struct inode *inode = file_inode(filp); in enable_verity()
252 err = vops->begin_enable_verity(filp); in enable_verity()
[all …]
/Linux-v6.1/include/linux/
Dfsverity.h44 int (*begin_enable_verity)(struct file *filp);
66 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);
157 int fsverity_ioctl_read_metadata(struct file *filp, const void __user *uarg);
174 static inline int fsverity_ioctl_enable(struct file *filp, in fsverity_ioctl_enable() argument
182 static inline int fsverity_ioctl_measure(struct file *filp, void __user *arg) in fsverity_ioctl_measure() argument
196 static inline int fsverity_file_open(struct inode *inode, struct file *filp) in fsverity_file_open() argument
213 static inline int fsverity_ioctl_read_metadata(struct file *filp, in fsverity_ioctl_read_metadata() argument
/Linux-v6.1/net/sunrpc/
Dcache.c826 static ssize_t cache_read(struct file *filp, char __user *buf, size_t count, in cache_read() argument
829 struct cache_reader *rp = filp->private_data; in cache_read()
831 struct inode *inode = file_inode(filp); in cache_read()
946 static ssize_t cache_write(struct file *filp, const char __user *buf, in cache_write() argument
950 struct address_space *mapping = filp->f_mapping; in cache_write()
951 struct inode *inode = file_inode(filp); in cache_write()
966 static __poll_t cache_poll(struct file *filp, poll_table *wait, in cache_poll() argument
970 struct cache_reader *rp = filp->private_data; in cache_poll()
973 poll_wait(filp, &queue_wait, wait); in cache_poll()
993 static int cache_ioctl(struct inode *ino, struct file *filp, in cache_ioctl() argument
[all …]
/Linux-v6.1/fs/debugfs/
Dfile.c48 #define F_DENTRY(filp) ((filp)->f_path.dentry) argument
50 const struct file_operations *debugfs_real_fops(const struct file *filp) in debugfs_real_fops() argument
52 struct debugfs_fsdata *fsd = F_DENTRY(filp)->d_fsdata; in debugfs_real_fops()
147 struct file *filp, in debugfs_locked_down() argument
151 !(filp->f_mode & FMODE_WRITE) && in debugfs_locked_down()
163 static int open_proxy_open(struct inode *inode, struct file *filp) in open_proxy_open() argument
165 struct dentry *dentry = F_DENTRY(filp); in open_proxy_open()
173 real_fops = debugfs_real_fops(filp); in open_proxy_open()
175 r = debugfs_locked_down(inode, filp, real_fops); in open_proxy_open()
194 replace_fops(filp, real_fops); in open_proxy_open()
[all …]
/Linux-v6.1/fs/f2fs/
Dfile.c537 static int f2fs_file_open(struct inode *inode, struct file *filp) in f2fs_file_open() argument
539 int err = fscrypt_file_open(inode, filp); in f2fs_file_open()
547 err = fsverity_file_open(inode, filp); in f2fs_file_open()
551 filp->f_mode |= FMODE_NOWAIT; in f2fs_file_open()
553 return dquot_file_open(inode, filp); in f2fs_file_open()
1858 static int f2fs_release_file(struct inode *inode, struct file *filp) in f2fs_release_file() argument
1864 if (!(filp->f_mode & FMODE_WRITE) || in f2fs_release_file()
2026 static int f2fs_ioc_getversion(struct file *filp, unsigned long arg) in f2fs_ioc_getversion() argument
2028 struct inode *inode = file_inode(filp); in f2fs_ioc_getversion()
2033 static int f2fs_ioc_start_atomic_write(struct file *filp) in f2fs_ioc_start_atomic_write() argument
[all …]
/Linux-v6.1/drivers/vfio/pci/mlx5/
Dmain.c121 migf->filp->f_pos = 0; in mlx5vf_disable_fd()
125 static int mlx5vf_release_file(struct inode *inode, struct file *filp) in mlx5vf_release_file() argument
127 struct mlx5_vf_migration_file *migf = filp->private_data; in mlx5vf_release_file()
135 static ssize_t mlx5vf_save_read(struct file *filp, char __user *buf, size_t len, in mlx5vf_save_read() argument
138 struct mlx5_vf_migration_file *migf = filp->private_data; in mlx5vf_save_read()
143 pos = &filp->f_pos; in mlx5vf_save_read()
145 if (!(filp->f_flags & O_NONBLOCK)) { in mlx5vf_save_read()
152 if ((filp->f_flags & O_NONBLOCK) && !READ_ONCE(migf->total_length)) { in mlx5vf_save_read()
200 static __poll_t mlx5vf_save_poll(struct file *filp, in mlx5vf_save_poll() argument
203 struct mlx5_vf_migration_file *migf = filp->private_data; in mlx5vf_save_poll()
[all …]
/Linux-v6.1/drivers/dax/
Ddevice.c80 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()
98 page->mapping = filp->f_mapping; in dax_set_mapping()
234 struct file *filp = vmf->vma->vm_file; in dev_dax_huge_fault() local
237 struct dev_dax *dev_dax = filp->private_data; in dev_dax_huge_fault()
270 struct file *filp = vma->vm_file; in dev_dax_may_split() local
271 struct dev_dax *dev_dax = filp->private_data; in dev_dax_may_split()
280 struct file *filp = vma->vm_file; in dev_dax_pagesize() local
281 struct dev_dax *dev_dax = filp->private_data; in dev_dax_pagesize()
293 static int dax_mmap(struct file *filp, struct vm_area_struct *vma) in dax_mmap() argument
[all …]
/Linux-v6.1/drivers/rapidio/devices/
Drio_mport_cdev.c109 struct file *filp; member
131 struct file *filp; member
359 rio_mport_create_outbound_mapping(struct mport_dev *md, struct file *filp, in rio_mport_create_outbound_mapping() argument
382 map->filp = filp; in rio_mport_create_outbound_mapping()
393 rio_mport_get_outbound_mapping(struct mport_dev *md, struct file *filp, in rio_mport_get_outbound_mapping() argument
419 err = rio_mport_create_outbound_mapping(md, filp, rioid, raddr, in rio_mport_get_outbound_mapping()
425 static int rio_mport_obw_map(struct file *filp, void __user *arg) in rio_mport_obw_map() argument
427 struct mport_cdev_priv *priv = filp->private_data; in rio_mport_obw_map()
439 ret = rio_mport_get_outbound_mapping(data, filp, map.rioid, in rio_mport_obw_map()
459 static int rio_mport_obw_free(struct file *filp, void __user *arg) in rio_mport_obw_free() argument
[all …]
/Linux-v6.1/drivers/gpu/drm/
Ddrm_file.c260 drm_legacy_lock_release(dev, file->filp); in drm_file_free()
294 static void drm_close_helper(struct file *filp) in drm_close_helper() argument
296 struct drm_file *file_priv = filp->private_data; in drm_close_helper()
329 static int drm_open_helper(struct file *filp, struct drm_minor *minor) in drm_open_helper() argument
335 if (filp->f_flags & O_EXCL) in drm_open_helper()
358 filp->private_data = priv; in drm_open_helper()
359 filp->f_mode |= FMODE_UNSIGNED_OFFSET; in drm_open_helper()
360 priv->filp = filp; in drm_open_helper()
405 int drm_open(struct inode *inode, struct file *filp) in drm_open() argument
424 filp->f_mapping = dev->anon_inode->i_mapping; in drm_open()
[all …]
/Linux-v6.1/drivers/s390/char/
Dtape_char.c129 tapechar_read(struct file *filp, char __user *data, size_t count, loff_t *ppos) in tapechar_read() argument
137 device = (struct tape_device *) filp->private_data; in tapechar_read()
187 tapechar_write(struct file *filp, const char __user *data, size_t count, loff_t *ppos) in tapechar_write() argument
197 device = (struct tape_device *) filp->private_data; in tapechar_write()
271 tapechar_open (struct inode *inode, struct file *filp) in tapechar_open() argument
277 imajor(file_inode(filp)), in tapechar_open()
278 iminor(file_inode(filp))); in tapechar_open()
280 if (imajor(file_inode(filp)) != tapechar_major) in tapechar_open()
283 minor = iminor(file_inode(filp)); in tapechar_open()
292 filp->private_data = device; in tapechar_open()
[all …]
/Linux-v6.1/drivers/media/pci/ivtv/
Divtv-fileops.h13 int ivtv_v4l2_open(struct file *filp);
14 ssize_t ivtv_v4l2_read(struct file *filp, char __user *buf, size_t count,
16 ssize_t ivtv_v4l2_write(struct file *filp, const char __user *buf, size_t count,
18 int ivtv_v4l2_close(struct file *filp);
19 __poll_t ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait);
20 __poll_t ivtv_v4l2_dec_poll(struct file *filp, poll_table * wait);
/Linux-v6.1/drivers/net/ethernet/intel/ixgbe/
Dixgbe_debugfs.c13 static ssize_t ixgbe_dbg_common_ops_read(struct file *filp, char __user *buffer, in ixgbe_dbg_common_ops_read() argument
17 struct ixgbe_adapter *adapter = filp->private_data; in ixgbe_dbg_common_ops_read()
48 static ssize_t ixgbe_dbg_reg_ops_read(struct file *filp, char __user *buffer, in ixgbe_dbg_reg_ops_read() argument
51 return ixgbe_dbg_common_ops_read(filp, buffer, count, ppos, in ixgbe_dbg_reg_ops_read()
62 static ssize_t ixgbe_dbg_reg_ops_write(struct file *filp, in ixgbe_dbg_reg_ops_write() argument
66 struct ixgbe_adapter *adapter = filp->private_data; in ixgbe_dbg_reg_ops_write()
131 static ssize_t ixgbe_dbg_netdev_ops_read(struct file *filp, char __user *buffer, in ixgbe_dbg_netdev_ops_read() argument
134 return ixgbe_dbg_common_ops_read(filp, buffer, count, ppos, in ixgbe_dbg_netdev_ops_read()
145 static ssize_t ixgbe_dbg_netdev_ops_write(struct file *filp, in ixgbe_dbg_netdev_ops_write() argument
149 struct ixgbe_adapter *adapter = filp->private_data; in ixgbe_dbg_netdev_ops_write()
/Linux-v6.1/fs/nilfs2/
Dioctl.c187 static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp, in nilfs_ioctl_change_cpmode() argument
198 ret = mnt_want_write_file(filp); in nilfs_ioctl_change_cpmode()
218 mnt_drop_write_file(filp); in nilfs_ioctl_change_cpmode()
242 nilfs_ioctl_delete_checkpoint(struct inode *inode, struct file *filp, in nilfs_ioctl_delete_checkpoint() argument
253 ret = mnt_want_write_file(filp); in nilfs_ioctl_delete_checkpoint()
268 mnt_drop_write_file(filp); in nilfs_ioctl_delete_checkpoint()
321 static int nilfs_ioctl_get_cpstat(struct inode *inode, struct file *filp, in nilfs_ioctl_get_cpstat() argument
388 static int nilfs_ioctl_get_sustat(struct inode *inode, struct file *filp, in nilfs_ioctl_get_sustat() argument
497 static int nilfs_ioctl_get_bdescs(struct inode *inode, struct file *filp, in nilfs_ioctl_get_bdescs() argument
843 static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp, in nilfs_ioctl_clean_segments() argument
[all …]

12345678910>>...29