Home
last modified time | relevance | path

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

12345678910>>...28

/Linux-v4.19/fs/
Dfcntl.c35 static int setfl(int fd, struct file * filp, unsigned long arg) in setfl() argument
37 struct inode * inode = file_inode(filp); in setfl()
44 if (((arg ^ filp->f_flags) & O_APPEND) && IS_APPEND(inode)) in setfl()
48 if ((arg & O_NOATIME) && !(filp->f_flags & O_NOATIME)) in setfl()
59 if (!filp->f_mapping || !filp->f_mapping->a_ops || in setfl()
60 !filp->f_mapping->a_ops->direct_IO) 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.c39 long vfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in vfs_ioctl() argument
43 if (!filp->f_op->unlocked_ioctl) in vfs_ioctl()
46 error = filp->f_op->unlocked_ioctl(filp, cmd, arg); in vfs_ioctl()
54 static int ioctl_fibmap(struct file *filp, int __user *p) in ioctl_fibmap() argument
56 struct address_space *mapping = filp->f_mapping; in ioctl_fibmap()
177 static int ioctl_fiemap(struct file *filp, unsigned long arg) in ioctl_fiemap() argument
182 struct inode *inode = file_inode(filp); in ioctl_fiemap()
461 int ioctl_preallocate(struct file *filp, void __user *argp) in ioctl_preallocate() argument
463 struct inode *inode = file_inode(filp); in ioctl_preallocate()
473 sr.l_start += filp->f_pos; in ioctl_preallocate()
[all …]
Dlocks.c266 locks_check_ctx_file_list(struct file *filp, struct list_head *list, in locks_check_ctx_file_list() argument
270 struct inode *inode = locks_inode(filp); in locks_check_ctx_file_list()
273 if (fl->fl_file == filp) in locks_check_ctx_file_list()
419 flock_make_lock(struct file *filp, unsigned int cmd) in flock_make_lock() argument
431 fl->fl_file = filp; in flock_make_lock()
432 fl->fl_owner = filp; in flock_make_lock()
455 static int flock64_to_posix_lock(struct file *filp, struct file_lock *fl, in flock64_to_posix_lock() argument
463 fl->fl_start = filp->f_pos; in flock64_to_posix_lock()
466 fl->fl_start = i_size_read(file_inode(filp)); in flock64_to_posix_lock()
494 fl->fl_file = filp; in flock64_to_posix_lock()
[all …]
Dpipe.c249 struct file *filp = iocb->ki_filp; in pipe_read() local
250 struct pipe_inode_info *pipe = filp->private_data; in pipe_read()
319 if (filp->f_flags & O_NONBLOCK) { in pipe_read()
343 file_accessed(filp); in pipe_read()
355 struct file *filp = iocb->ki_filp; in pipe_write() local
356 struct pipe_inode_info *pipe = filp->private_data; in pipe_write()
443 if (is_packetized(filp)) { in pipe_write()
455 if (filp->f_flags & O_NONBLOCK) { in pipe_write()
480 if (ret > 0 && sb_start_write_trylock(file_inode(filp)->i_sb)) { in pipe_write()
481 int err = file_update_time(filp); in pipe_write()
[all …]
/Linux-v4.19/drivers/media/
Dmedia-devnode.c78 static ssize_t media_read(struct file *filp, char __user *buf, in media_read() argument
81 struct media_devnode *devnode = media_devnode_data(filp); in media_read()
87 return devnode->fops->read(filp, buf, sz, off); in media_read()
90 static ssize_t media_write(struct file *filp, const char __user *buf, in media_write() argument
93 struct media_devnode *devnode = media_devnode_data(filp); in media_write()
99 return devnode->fops->write(filp, buf, sz, off); in media_write()
102 static __poll_t media_poll(struct file *filp, in media_poll() argument
105 struct media_devnode *devnode = media_devnode_data(filp); in media_poll()
111 return devnode->fops->poll(filp, poll); in media_poll()
115 __media_ioctl(struct file *filp, unsigned int cmd, unsigned long arg, in __media_ioctl() argument
[all …]
/Linux-v4.19/drivers/gpu/drm/i915/selftests/
Dmock_drm.c29 struct file *filp; in mock_file() local
42 filp = kzalloc(sizeof(*filp), GFP_KERNEL); in mock_file()
43 if (!filp) { in mock_file()
48 err = drm_open(inode, filp); in mock_file()
52 file = filp->private_data; in mock_file()
53 memset(&file->filp, POISON_INUSE, sizeof(file->filp)); in mock_file()
56 kfree(filp); in mock_file()
61 kfree(filp); in mock_file()
70 struct file filp = { .private_data = file }; in mock_file_free() local
72 drm_release(NULL, &filp); in mock_file_free()
/Linux-v4.19/fs/nfs/
Dfile.c64 nfs_file_open(struct inode *inode, struct file *filp) in nfs_file_open() argument
68 dprintk("NFS: open file(%pD2)\n", filp); in nfs_file_open()
71 res = nfs_check_flags(filp->f_flags); in nfs_file_open()
75 res = nfs_open(inode, filp); in nfs_file_open()
80 nfs_file_release(struct inode *inode, struct file *filp) in nfs_file_release() argument
82 dprintk("NFS: release(%pD2)\n", filp); in nfs_file_release()
85 nfs_file_clear_open_context(filp); in nfs_file_release()
101 static int nfs_revalidate_file_size(struct inode *inode, struct file *filp) in nfs_revalidate_file_size() argument
105 if (filp->f_flags & O_DIRECT) in nfs_revalidate_file_size()
114 loff_t nfs_file_llseek(struct file *filp, loff_t offset, int whence) in nfs_file_llseek() argument
[all …]
/Linux-v4.19/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-v4.19/fs/9p/
Dvfs_file.c131 static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_lock() argument
134 struct inode *inode = file_inode(filp); in v9fs_file_lock()
136 p9_debug(P9_DEBUG_VFS, "filp: %p lock: %p\n", filp, fl); in v9fs_file_lock()
150 static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_do_lock() argument
158 fid = filp->private_data; in v9fs_file_do_lock()
164 res = locks_lock_file_wait(filp, fl); in v9fs_file_do_lock()
235 locks_lock_file_wait(filp, fl); in v9fs_file_do_lock()
242 static int v9fs_file_getlock(struct file *filp, struct file_lock *fl) in v9fs_file_getlock() argument
248 fid = filp->private_data; in v9fs_file_getlock()
251 posix_test_lock(filp, fl); in v9fs_file_getlock()
[all …]
/Linux-v4.19/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-v4.19/net/qrtr/
Dtun.c31 static int qrtr_tun_open(struct inode *inode, struct file *filp) in qrtr_tun_open() argument
44 filp->private_data = tun; in qrtr_tun_open()
51 struct file *filp = iocb->ki_filp; in qrtr_tun_read_iter() local
52 struct qrtr_tun *tun = filp->private_data; in qrtr_tun_read_iter()
57 if (filp->f_flags & O_NONBLOCK) in qrtr_tun_read_iter()
77 struct file *filp = iocb->ki_filp; in qrtr_tun_write_iter() local
78 struct qrtr_tun *tun = filp->private_data; in qrtr_tun_write_iter()
95 static __poll_t qrtr_tun_poll(struct file *filp, poll_table *wait) in qrtr_tun_poll() argument
97 struct qrtr_tun *tun = filp->private_data; in qrtr_tun_poll()
100 poll_wait(filp, &tun->readq, wait); in qrtr_tun_poll()
[all …]
/Linux-v4.19/net/sunrpc/
Ddebugfs.c87 static int tasks_open(struct inode *inode, struct file *filp) in tasks_open() argument
89 int ret = seq_open(filp, &tasks_seq_operations); in tasks_open()
91 struct seq_file *seq = filp->private_data; in tasks_open()
95 seq_release(inode, filp); in tasks_open()
104 tasks_release(struct inode *inode, struct file *filp) in tasks_release() argument
106 struct seq_file *seq = filp->private_data; in tasks_release()
110 return seq_release(inode, filp); in tasks_release()
189 xprt_info_open(struct inode *inode, struct file *filp) in xprt_info_open() argument
194 ret = single_open(filp, xprt_info_show, xprt); in xprt_info_open()
198 single_release(inode, filp); in xprt_info_open()
[all …]
Dcache.c775 static ssize_t cache_read(struct file *filp, char __user *buf, size_t count, in cache_read() argument
778 struct cache_reader *rp = filp->private_data; in cache_read()
780 struct inode *inode = file_inode(filp); in cache_read()
913 static ssize_t cache_write(struct file *filp, const char __user *buf, in cache_write() argument
917 struct address_space *mapping = filp->f_mapping; in cache_write()
918 struct inode *inode = file_inode(filp); in cache_write()
933 static __poll_t cache_poll(struct file *filp, poll_table *wait, in cache_poll() argument
937 struct cache_reader *rp = filp->private_data; in cache_poll()
940 poll_wait(filp, &queue_wait, wait); in cache_poll()
960 static int cache_ioctl(struct inode *ino, struct file *filp, in cache_ioctl() argument
[all …]
/Linux-v4.19/drivers/staging/android/
Dvsoc.c150 static loff_t vsoc_lseek(struct file *filp, loff_t offset, int origin);
160 static ssize_t vsoc_get_area(struct file *filp, __u32 *perm_off);
175 inline int vsoc_validate_filep(struct file *filp) in vsoc_validate_filep() argument
177 int ret = vsoc_validate_inode(file_inode(filp)); in vsoc_validate_filep()
181 if (!filp->private_data) { in vsoc_validate_filep()
184 iminor(file_inode(filp))); in vsoc_validate_filep()
381 static long do_vsoc_describe_region(struct file *filp, in do_vsoc_describe_region() argument
385 int retval = vsoc_validate_filep(filp); in do_vsoc_describe_region()
389 region_p = vsoc_region_from_filep(filp); in do_vsoc_describe_region()
399 static int handle_vsoc_cond_wait(struct file *filp, struct vsoc_cond_wait *arg) in handle_vsoc_cond_wait() argument
[all …]
/Linux-v4.19/fs/debugfs/
Dfile.c46 #define F_DENTRY(filp) ((filp)->f_path.dentry) argument
48 const struct file_operations *debugfs_real_fops(const struct file *filp) in debugfs_real_fops() argument
50 struct debugfs_fsdata *fsd = F_DENTRY(filp)->d_fsdata; in debugfs_real_fops()
139 static int open_proxy_open(struct inode *inode, struct file *filp) in open_proxy_open() argument
141 struct dentry *dentry = F_DENTRY(filp); in open_proxy_open()
149 real_fops = debugfs_real_fops(filp); in open_proxy_open()
158 replace_fops(filp, real_fops); in open_proxy_open()
161 r = real_fops->open(inode, filp); in open_proxy_open()
175 #define FULL_PROXY_FUNC(name, ret_type, filp, proto, args) \ argument
178 struct dentry *dentry = F_DENTRY(filp); \
[all …]
/Linux-v4.19/fs/f2fs/
Dfile.c491 static int f2fs_file_open(struct inode *inode, struct file *filp) in f2fs_file_open() argument
493 int err = fscrypt_file_open(inode, filp); in f2fs_file_open()
498 filp->f_mode |= FMODE_NOWAIT; in f2fs_file_open()
500 return dquot_file_open(inode, filp); in f2fs_file_open()
1588 static int f2fs_release_file(struct inode *inode, struct file *filp) in f2fs_release_file() argument
1594 if (!(filp->f_mode & FMODE_WRITE) || in f2fs_release_file()
1627 static int f2fs_ioc_getflags(struct file *filp, unsigned long arg) in f2fs_ioc_getflags() argument
1629 struct inode *inode = file_inode(filp); in f2fs_ioc_getflags()
1675 static int f2fs_ioc_setflags(struct file *filp, unsigned long arg) in f2fs_ioc_setflags() argument
1677 struct inode *inode = file_inode(filp); in f2fs_ioc_setflags()
[all …]
/Linux-v4.19/drivers/gpu/drm/
Ddrm_gem.c138 struct file *filp; in drm_gem_object_init() local
142 filp = shmem_file_setup("drm mm object", size, VM_NORESERVE); in drm_gem_object_init()
143 if (IS_ERR(filp)) in drm_gem_object_init()
144 return PTR_ERR(filp); in drm_gem_object_init()
146 obj->filp = filp; in drm_gem_object_init()
168 obj->filp = NULL; in drm_gem_private_object_init()
178 drm_gem_remove_prime_handles(struct drm_gem_object *obj, struct drm_file *filp) in drm_gem_remove_prime_handles() argument
184 mutex_lock(&filp->prime.lock); in drm_gem_remove_prime_handles()
186 drm_prime_remove_buf_handle_locked(&filp->prime, in drm_gem_remove_prime_handles()
189 mutex_unlock(&filp->prime.lock); in drm_gem_remove_prime_handles()
[all …]
/Linux-v4.19/drivers/rapidio/devices/
Drio_mport_cdev.c113 struct file *filp; member
135 struct file *filp; member
363 rio_mport_create_outbound_mapping(struct mport_dev *md, struct file *filp, in rio_mport_create_outbound_mapping() argument
386 map->filp = filp; in rio_mport_create_outbound_mapping()
397 rio_mport_get_outbound_mapping(struct mport_dev *md, struct file *filp, in rio_mport_get_outbound_mapping() argument
423 err = rio_mport_create_outbound_mapping(md, filp, rioid, raddr, in rio_mport_get_outbound_mapping()
429 static int rio_mport_obw_map(struct file *filp, void __user *arg) in rio_mport_obw_map() argument
431 struct mport_cdev_priv *priv = filp->private_data; in rio_mport_obw_map()
443 ret = rio_mport_get_outbound_mapping(data, filp, map.rioid, in rio_mport_obw_map()
463 static int rio_mport_obw_free(struct file *filp, void __user *arg) in rio_mport_obw_free() argument
[all …]
/Linux-v4.19/fs/nilfs2/
Dioctl.c128 static int nilfs_ioctl_setflags(struct inode *inode, struct file *filp, in nilfs_ioctl_setflags() argument
141 ret = mnt_want_write_file(filp); in nilfs_ioctl_setflags()
176 mnt_drop_write_file(filp); in nilfs_ioctl_setflags()
207 static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp, in nilfs_ioctl_change_cpmode() argument
218 ret = mnt_want_write_file(filp); in nilfs_ioctl_change_cpmode()
238 mnt_drop_write_file(filp); in nilfs_ioctl_change_cpmode()
262 nilfs_ioctl_delete_checkpoint(struct inode *inode, struct file *filp, in nilfs_ioctl_delete_checkpoint() argument
273 ret = mnt_want_write_file(filp); in nilfs_ioctl_delete_checkpoint()
288 mnt_drop_write_file(filp); in nilfs_ioctl_delete_checkpoint()
341 static int nilfs_ioctl_get_cpstat(struct inode *inode, struct file *filp, in nilfs_ioctl_get_cpstat() argument
[all …]
/Linux-v4.19/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-v4.19/drivers/media/pci/ivtv/
Divtv-fileops.h25 int ivtv_v4l2_open(struct file *filp);
26 ssize_t ivtv_v4l2_read(struct file *filp, char __user *buf, size_t count,
28 ssize_t ivtv_v4l2_write(struct file *filp, const char __user *buf, size_t count,
30 int ivtv_v4l2_close(struct file *filp);
31 __poll_t ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait);
32 __poll_t ivtv_v4l2_dec_poll(struct file *filp, poll_table * wait);
/Linux-v4.19/mm/
Dreadahead.c113 static int read_pages(struct address_space *mapping, struct file *filp, in read_pages() argument
123 ret = mapping->a_ops->readpages(filp, mapping, pages, nr_pages); in read_pages()
133 mapping->a_ops->readpage(filp, page); in read_pages()
153 struct file *filp, pgoff_t offset, unsigned long nr_to_read, in __do_page_cache_readahead() argument
189 read_pages(mapping, filp, &page_pool, nr_pages, in __do_page_cache_readahead()
211 read_pages(mapping, filp, &page_pool, nr_pages, gfp_mask); in __do_page_cache_readahead()
221 int force_page_cache_readahead(struct address_space *mapping, struct file *filp, in force_page_cache_readahead() argument
225 struct file_ra_state *ra = &filp->f_ra; in force_page_cache_readahead()
242 __do_page_cache_readahead(mapping, filp, offset, this_chunk, 0); in force_page_cache_readahead()
384 struct file_ra_state *ra, struct file *filp, in ondemand_readahead() argument
[all …]
/Linux-v4.19/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-v4.19/arch/x86/mm/
Ddebug_pagetables.c13 static int ptdump_open(struct inode *inode, struct file *filp) in ptdump_open() argument
15 return single_open(filp, ptdump_show, NULL); in ptdump_open()
36 static int ptdump_open_curknl(struct inode *inode, struct file *filp) in ptdump_open_curknl() argument
38 return single_open(filp, ptdump_show_curknl, NULL); in ptdump_open_curknl()
62 static int ptdump_open_curusr(struct inode *inode, struct file *filp) in ptdump_open_curusr() argument
64 return single_open(filp, ptdump_show_curusr, NULL); in ptdump_open_curusr()
86 static int ptdump_open_efi(struct inode *inode, struct file *filp) in ptdump_open_efi() argument
88 return single_open(filp, ptdump_show_efi, NULL); in ptdump_open_efi()

12345678910>>...28