Home
last modified time | relevance | path

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

12345

/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 …]
Dlocks.c308 locks_check_ctx_file_list(struct file *filp, struct list_head *list, in locks_check_ctx_file_list() argument
312 struct inode *inode = locks_inode(filp); in locks_check_ctx_file_list()
315 if (fl->fl_file == filp) in locks_check_ctx_file_list()
479 flock_make_lock(struct file *filp, unsigned int cmd, struct file_lock *fl) in flock_make_lock() argument
494 fl->fl_file = filp; in flock_make_lock()
495 fl->fl_owner = filp; in flock_make_lock()
518 static int flock64_to_posix_lock(struct file *filp, struct file_lock *fl, in flock64_to_posix_lock() argument
526 fl->fl_start = filp->f_pos; in flock64_to_posix_lock()
529 fl->fl_start = i_size_read(file_inode(filp)); in flock64_to_posix_lock()
557 fl->fl_file = filp; in flock64_to_posix_lock()
[all …]
Dioctl.c41 long vfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in vfs_ioctl() argument
45 if (!filp->f_op->unlocked_ioctl) in vfs_ioctl()
48 error = filp->f_op->unlocked_ioctl(filp, cmd, arg); in vfs_ioctl()
56 static int ioctl_fibmap(struct file *filp, int __user *p) in ioctl_fibmap() argument
58 struct inode *inode = file_inode(filp); in ioctl_fibmap()
80 sb->s_id, filp); in ioctl_fibmap()
196 static int ioctl_fiemap(struct file *filp, struct fiemap __user *ufiemap) in ioctl_fiemap() argument
200 struct inode *inode = file_inode(filp); in ioctl_fiemap()
473 static int ioctl_preallocate(struct file *filp, int mode, void __user *argp) in ioctl_preallocate() argument
475 struct inode *inode = file_inode(filp); in ioctl_preallocate()
[all …]
Dpipe.c233 struct file *filp = iocb->ki_filp; in pipe_read() local
234 struct pipe_inode_info *pipe = filp->private_data; in pipe_read()
344 if (filp->f_flags & O_NONBLOCK) { in pipe_read()
396 file_accessed(filp); in pipe_read()
419 struct file *filp = iocb->ki_filp; in pipe_write() local
420 struct pipe_inode_info *pipe = filp->private_data; in pipe_write()
528 if (is_packetized(filp)) in pipe_write()
552 if (filp->f_flags & O_NONBLOCK) { in pipe_write()
599 if (ret > 0 && sb_start_write_trylock(file_inode(filp)->i_sb)) { in pipe_write()
600 int err = file_update_time(filp); in pipe_write()
[all …]
Dopen.c40 struct file *filp) in do_truncate() argument
51 if (filp) { in do_truncate()
52 newattrs.ia_file = filp; in do_truncate()
927 char *file_path(struct file *filp, char *buf, int buflen) in file_path() argument
929 return d_path(&filp->f_path, buf, buflen); in file_path()
1315 int filp_close(struct file *filp, fl_owner_t id) in filp_close() argument
1319 if (!file_count(filp)) { in filp_close()
1324 if (filp->f_op->flush) in filp_close()
1325 retval = filp->f_op->flush(filp, id); in filp_close()
1327 if (likely(!(filp->f_mode & FMODE_PATH))) { in filp_close()
[all …]
/fs/nfs/
Dfile.c65 nfs_file_open(struct inode *inode, struct file *filp) in nfs_file_open() argument
69 dprintk("NFS: open file(%pD2)\n", filp); in nfs_file_open()
72 res = nfs_check_flags(filp->f_flags); in nfs_file_open()
76 res = nfs_open(inode, filp); in nfs_file_open()
81 nfs_file_release(struct inode *inode, struct file *filp) in nfs_file_release() argument
83 dprintk("NFS: release(%pD2)\n", filp); in nfs_file_release()
86 nfs_file_clear_open_context(filp); in nfs_file_release()
102 static int nfs_revalidate_file_size(struct inode *inode, struct file *filp) in nfs_revalidate_file_size() argument
106 if (filp->f_flags & O_DIRECT) in nfs_revalidate_file_size()
115 loff_t nfs_file_llseek(struct file *filp, loff_t offset, int whence) in nfs_file_llseek() argument
[all …]
/fs/verity/
Denable.c21 static struct page *read_file_data_page(struct file *filp, pgoff_t index, in read_file_data_page() argument
27 page = find_get_page_flags(filp->f_mapping, index, FGP_ACCESSED); in read_file_data_page()
32 page_cache_sync_readahead(filp->f_mapping, ra, filp, in read_file_data_page()
34 page = read_mapping_page(filp->f_mapping, index, NULL); in read_file_data_page()
39 page_cache_async_readahead(filp->f_mapping, ra, filp, page, in read_file_data_page()
44 static int build_merkle_tree_level(struct file *filp, unsigned int level, in build_merkle_tree_level() argument
50 struct inode *inode = file_inode(filp); in build_merkle_tree_level()
69 file_ra_state_init(&ra, filp->f_mapping); in build_merkle_tree_level()
80 src_page = read_file_data_page(filp, i, &ra, in build_merkle_tree_level()
151 static int build_merkle_tree(struct file *filp, in build_merkle_tree() argument
[all …]
/fs/9p/
Dvfs_file.c116 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()
135 static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl) in v9fs_file_do_lock() argument
144 fid = filp->private_data; in v9fs_file_do_lock()
150 res = locks_lock_file_wait(filp, fl); in v9fs_file_do_lock()
178 v9ses = v9fs_inode2v9ses(file_inode(filp)); in v9fs_file_do_lock()
232 locks_lock_file_wait(filp, fl); in v9fs_file_do_lock()
241 static int v9fs_file_getlock(struct file *filp, struct file_lock *fl) in v9fs_file_getlock() argument
247 fid = filp->private_data; in v9fs_file_getlock()
[all …]
Dvfs_addr.c83 static int v9fs_vfs_readpage(struct file *filp, struct page *page) in v9fs_vfs_readpage() argument
85 return v9fs_fid_readpage(filp->private_data, page); in v9fs_vfs_readpage()
98 static int v9fs_vfs_readpages(struct file *filp, struct address_space *mapping, in v9fs_vfs_readpages() argument
105 p9_debug(P9_DEBUG_VFS, "inode: %p file: %p\n", inode, filp); in v9fs_vfs_readpages()
112 filp->private_data); in v9fs_vfs_readpages()
255 static int v9fs_write_begin(struct file *filp, struct address_space *mapping, in v9fs_write_begin() argument
266 p9_debug(P9_DEBUG_VFS, "filp %p, mapping %p\n", filp, mapping); in v9fs_write_begin()
291 static int v9fs_write_end(struct file *filp, struct address_space *mapping, in v9fs_write_end() argument
298 p9_debug(P9_DEBUG_VFS, "filp %p, mapping %p\n", filp, mapping); in v9fs_write_end()
/fs/f2fs/
Dfile.c526 static int f2fs_file_open(struct inode *inode, struct file *filp) in f2fs_file_open() argument
528 int err = fscrypt_file_open(inode, filp); in f2fs_file_open()
536 err = fsverity_file_open(inode, filp); in f2fs_file_open()
540 filp->f_mode |= FMODE_NOWAIT; in f2fs_file_open()
542 return dquot_file_open(inode, filp); in f2fs_file_open()
1783 static int f2fs_release_file(struct inode *inode, struct file *filp) in f2fs_release_file() argument
1789 if (!(filp->f_mode & FMODE_WRITE) || in f2fs_release_file()
1958 static int f2fs_ioc_getflags(struct file *filp, unsigned long arg) in f2fs_ioc_getflags() argument
1960 struct inode *inode = file_inode(filp); in f2fs_ioc_getflags()
1978 static int f2fs_ioc_setflags(struct file *filp, unsigned long arg) in f2fs_ioc_setflags() argument
[all …]
/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()
155 struct file *filp, in debugfs_locked_down() argument
159 !(filp->f_mode & FMODE_WRITE) && in debugfs_locked_down()
171 static int open_proxy_open(struct inode *inode, struct file *filp) in open_proxy_open() argument
173 struct dentry *dentry = F_DENTRY(filp); in open_proxy_open()
181 real_fops = debugfs_real_fops(filp); in open_proxy_open()
183 r = debugfs_locked_down(inode, filp, real_fops); in open_proxy_open()
202 replace_fops(filp, real_fops); in open_proxy_open()
[all …]
/fs/incfs/
Dverity.c58 static int incfs_get_root_hash(struct file *filp, u8 *root_hash) in incfs_get_root_hash() argument
60 struct data_file *df = get_incfs_data_file(filp); in incfs_get_root_hash()
71 static int incfs_end_enable_verity(struct file *filp, u8 *sig, size_t sig_size) in incfs_end_enable_verity() argument
73 struct inode *inode = file_inode(filp); in incfs_end_enable_verity()
78 struct data_file *df = get_incfs_data_file(filp); in incfs_end_enable_verity()
254 struct file *filp, int hash_algorithm) in incfs_get_fsverity_descriptor() argument
256 struct inode *inode = file_inode(filp); in incfs_get_fsverity_descriptor()
270 err = incfs_get_root_hash(filp, desc->root_hash); in incfs_get_fsverity_descriptor()
280 struct inode *inode, struct file *filp, in incfs_calc_verity_digest() argument
284 struct fsverity_descriptor *desc = incfs_get_fsverity_descriptor(filp, in incfs_calc_verity_digest()
[all …]
Dverity.h14 int incfs_ioctl_enable_verity(struct file *filp, const void __user *uarg);
15 int incfs_ioctl_measure_verity(struct file *filp, void __user *_uarg);
17 int incfs_fsverity_file_open(struct inode *inode, struct file *filp);
18 int incfs_ioctl_read_verity_metadata(struct file *filp,
23 static inline int incfs_ioctl_enable_verity(struct file *filp, in incfs_ioctl_enable_verity() argument
29 static inline int incfs_ioctl_measure_verity(struct file *filp, in incfs_ioctl_measure_verity() argument
36 struct file *filp) in incfs_fsverity_file_open() argument
41 static inline int incfs_ioctl_read_verity_metadata(struct file *filp, in incfs_ioctl_read_verity_metadata() argument
/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()
171 mnt_drop_write_file(filp); in nilfs_ioctl_setflags()
202 static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp, in nilfs_ioctl_change_cpmode() argument
213 ret = mnt_want_write_file(filp); in nilfs_ioctl_change_cpmode()
233 mnt_drop_write_file(filp); in nilfs_ioctl_change_cpmode()
257 nilfs_ioctl_delete_checkpoint(struct inode *inode, struct file *filp, in nilfs_ioctl_delete_checkpoint() argument
268 ret = mnt_want_write_file(filp); in nilfs_ioctl_delete_checkpoint()
283 mnt_drop_write_file(filp); in nilfs_ioctl_delete_checkpoint()
336 static int nilfs_ioctl_get_cpstat(struct inode *inode, struct file *filp, in nilfs_ioctl_get_cpstat() argument
[all …]
/fs/ext4/
Dioctl.c467 static int ext4_ioctl_setproject(struct file *filp, __u32 projid) in ext4_ioctl_setproject() argument
469 struct inode *inode = file_inode(filp); in ext4_ioctl_setproject()
553 static int ext4_ioctl_setproject(struct file *filp, __u32 projid) in ext4_ioctl_setproject() argument
795 static int ext4_ioctl_get_es_cache(struct file *filp, unsigned long arg) in ext4_ioctl_get_es_cache() argument
800 struct inode *inode = file_inode(filp); in ext4_ioctl_get_es_cache()
823 static long __ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in __ext4_ioctl() argument
825 struct inode *inode = file_inode(filp); in __ext4_ioctl()
861 err = mnt_want_write_file(filp); in __ext4_ioctl()
872 mnt_drop_write_file(filp); in __ext4_ioctl()
894 err = mnt_want_write_file(filp); in __ext4_ioctl()
[all …]
Ddir.c82 struct inode *dir, struct file *filp, in __ext4_check_dir_entry() argument
115 if (filp) in __ext4_check_dir_entry()
116 ext4_error_file(filp, function, line, bh->b_blocknr, in __ext4_check_dir_entry()
339 static inline loff_t hash2pos(struct file *filp, __u32 major, __u32 minor) in hash2pos() argument
341 if ((filp->f_mode & FMODE_32BITHASH) || in hash2pos()
342 (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) in hash2pos()
348 static inline __u32 pos2maj_hash(struct file *filp, loff_t pos) in pos2maj_hash() argument
350 if ((filp->f_mode & FMODE_32BITHASH) || in pos2maj_hash()
351 (!(filp->f_mode & FMODE_64BITHASH) && is_32bit_api())) in pos2maj_hash()
357 static inline __u32 pos2min_hash(struct file *filp, loff_t pos) in pos2min_hash() argument
[all …]
/fs/notify/dnotify/
Ddnotify.c135 void dnotify_flush(struct file *filp, fl_owner_t id) in dnotify_flush() argument
144 inode = file_inode(filp); in dnotify_flush()
158 if ((dn->dn_owner == id) && (dn->dn_filp == filp)) { in dnotify_flush()
213 fl_owner_t id, int fd, struct file *filp, __u32 mask) in attach_dn() argument
220 if ((odn->dn_owner == id) && (odn->dn_filp == filp)) { in attach_dn()
230 dn->dn_filp = filp; in attach_dn()
243 int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) in fcntl_dirnotify() argument
265 dnotify_flush(filp, id); in fcntl_dirnotify()
271 inode = file_inode(filp); in fcntl_dirnotify()
283 error = security_path_notify(&filp->f_path, mask, in fcntl_dirnotify()
[all …]
/fs/reiserfs/
Dioctl.c23 long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in reiserfs_ioctl() argument
25 struct inode *inode = file_inode(filp); in reiserfs_ioctl()
35 err = reiserfs_unpack(inode, filp); in reiserfs_ioctl()
58 err = mnt_want_write_file(filp); in reiserfs_ioctl()
86 result = reiserfs_unpack(inode, filp); in reiserfs_ioctl()
97 mnt_drop_write_file(filp); in reiserfs_ioctl()
108 err = mnt_want_write_file(filp); in reiserfs_ioctl()
118 mnt_drop_write_file(filp); in reiserfs_ioctl()
168 int reiserfs_unpack(struct inode *inode, struct file *filp) in reiserfs_unpack() argument
/fs/ext2/
Dioctl.c21 long ext2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in ext2_ioctl() argument
23 struct inode *inode = file_inode(filp); in ext2_ioctl()
38 ret = mnt_want_write_file(filp); in ext2_ioctl()
79 mnt_drop_write_file(filp); in ext2_ioctl()
89 ret = mnt_want_write_file(filp); in ext2_ioctl()
104 mnt_drop_write_file(filp); in ext2_ioctl()
126 ret = mnt_want_write_file(filp); in ext2_ioctl()
153 mnt_drop_write_file(filp); in ext2_ioctl()
/fs/xfs/
Dxfs_ioctl.c192 struct file *filp; in xfs_open_by_handle() local
243 filp = dentry_open(&path, hreq->oflags, cred); in xfs_open_by_handle()
245 if (IS_ERR(filp)) { in xfs_open_by_handle()
247 return PTR_ERR(filp); in xfs_open_by_handle()
251 filp->f_flags |= O_NOATIME; in xfs_open_by_handle()
252 filp->f_mode |= FMODE_NOCMTIME; in xfs_open_by_handle()
255 fd_install(fd, filp); in xfs_open_by_handle()
631 struct file *filp, in xfs_ioc_space() argument
634 struct inode *inode = file_inode(filp); in xfs_ioc_space()
644 if (!(filp->f_mode & FMODE_WRITE)) in xfs_ioc_space()
[all …]
Dxfs_ioctl32.c433 struct file *filp, in xfs_file_compat_ioctl() argument
437 struct inode *inode = file_inode(filp); in xfs_file_compat_ioctl()
456 return xfs_ioc_space(filp, &bf); in xfs_file_compat_ioctl()
465 error = mnt_want_write_file(filp); in xfs_file_compat_ioctl()
469 mnt_drop_write_file(filp); in xfs_file_compat_ioctl()
477 error = mnt_want_write_file(filp); in xfs_file_compat_ioctl()
481 mnt_drop_write_file(filp); in xfs_file_compat_ioctl()
490 return xfs_file_ioctl(filp, cmd, p); in xfs_file_compat_ioctl()
500 error = mnt_want_write_file(filp); in xfs_file_compat_ioctl()
504 mnt_drop_write_file(filp); in xfs_file_compat_ioctl()
[all …]
/fs/jfs/
Dioctl.c60 long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in jfs_ioctl() argument
62 struct inode *inode = file_inode(filp); in jfs_ioctl()
75 err = mnt_want_write_file(filp); in jfs_ioctl()
118 mnt_drop_write_file(filp); in jfs_ioctl()
161 long jfs_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in jfs_compat_ioctl() argument
175 return jfs_ioctl(filp, cmd, arg); in jfs_compat_ioctl()
/fs/nfsd/
Dlockd.c28 nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file **filp) in nlm_fopen() argument
39 nfserr = nfsd_open(rqstp, &fh, S_IFREG, NFSD_MAY_LOCK, filp); in nlm_fopen()
57 nlm_fclose(struct file *filp) in nlm_fclose() argument
59 fput(filp); in nlm_fclose()
/fs/jffs2/
Dfile.c24 static int jffs2_write_end(struct file *filp, struct address_space *mapping,
27 static int jffs2_write_begin(struct file *filp, struct address_space *mapping,
30 static int jffs2_readpage (struct file *filp, struct page *pg);
32 int jffs2_fsync(struct file *filp, loff_t start, loff_t end, int datasync) in jffs2_fsync() argument
34 struct inode *inode = filp->f_mapping->host; in jffs2_fsync()
38 ret = file_write_and_wait_range(filp, start, end); in jffs2_fsync()
121 static int jffs2_readpage (struct file *filp, struct page *pg) in jffs2_readpage() argument
132 static int jffs2_write_begin(struct file *filp, struct address_space *mapping, in jffs2_write_begin() argument
245 static int jffs2_write_end(struct file *filp, struct address_space *mapping, in jffs2_write_end() argument
/fs/fuse/
Dpassthrough.c81 struct file *passthrough_filp = ff->passthrough.filp; in fuse_passthrough_read_iter()
123 struct file *passthrough_filp = ff->passthrough.filp; in fuse_passthrough_write_iter()
173 struct file *passthrough_filp = ff->passthrough.filp; in fuse_passthrough_mmap()
236 passthrough->filp = passthrough_filp; in fuse_passthrough_open()
285 if (passthrough->filp) { in fuse_passthrough_release()
286 fput(passthrough->filp); in fuse_passthrough_release()
287 passthrough->filp = NULL; in fuse_passthrough_release()

12345