Home
last modified time | relevance | path

Searched refs:file (Results 1 – 25 of 555) sorted by relevance

12345678910>>...23

/fs/sdcardfs/
Dfile.c26 static ssize_t sdcardfs_read(struct file *file, char __user *buf, in sdcardfs_read() argument
30 struct file *lower_file; in sdcardfs_read()
31 struct dentry *dentry = file->f_path.dentry; in sdcardfs_read()
36 lower_file = sdcardfs_lower_file(file); in sdcardfs_read()
39 if (file->f_mode & FMODE_NOACTIVE) { in sdcardfs_read()
59 static ssize_t sdcardfs_write(struct file *file, const char __user *buf, in sdcardfs_write() argument
63 struct file *lower_file; in sdcardfs_write()
64 struct dentry *dentry = file->f_path.dentry; in sdcardfs_write()
73 lower_file = sdcardfs_lower_file(file); in sdcardfs_write()
88 static int sdcardfs_readdir(struct file *file, struct dir_context *ctx) in sdcardfs_readdir() argument
[all …]
Dmmap.c26 struct file *file; in sdcardfs_fault() local
29 file = (struct file *)vma->vm_private_data; in sdcardfs_fault()
30 lower_vm_ops = SDCARDFS_F(file)->lower_vm_ops; in sdcardfs_fault()
39 struct file *file = (struct file *)vma->vm_private_data; in sdcardfs_vm_open() local
41 get_file(file); in sdcardfs_vm_open()
46 struct file *file = (struct file *)vma->vm_private_data; in sdcardfs_vm_close() local
48 fput(file); in sdcardfs_vm_close()
55 struct file *file; in sdcardfs_page_mkwrite() local
58 file = (struct file *)vma->vm_private_data; in sdcardfs_page_mkwrite()
59 lower_vm_ops = SDCARDFS_F(file)->lower_vm_ops; in sdcardfs_page_mkwrite()
/fs/
Dfile_table.c46 struct file *f = container_of(head, struct file, f_u.fu_rcuhead); in file_free_rcu()
52 static inline void file_free(struct file *f) in file_free()
103 struct file *get_empty_filp(void) in get_empty_filp()
107 struct file *f; in get_empty_filp()
158 struct file *alloc_file(struct path *path, fmode_t mode, in alloc_file()
161 struct file *file; in alloc_file() local
163 file = get_empty_filp(); in alloc_file()
164 if (IS_ERR(file)) in alloc_file()
165 return file; in alloc_file()
167 file->f_path = *path; in alloc_file()
[all …]
Dread_write.c35 static inline int unsigned_offsets(struct file *file) in unsigned_offsets() argument
37 return file->f_mode & FMODE_UNSIGNED_OFFSET; in unsigned_offsets()
52 loff_t vfs_setpos(struct file *file, loff_t offset, loff_t maxsize) in vfs_setpos() argument
54 if (offset < 0 && !unsigned_offsets(file)) in vfs_setpos()
59 if (offset != file->f_pos) { in vfs_setpos()
60 file->f_pos = offset; in vfs_setpos()
61 file->f_version = 0; in vfs_setpos()
84 generic_file_llseek_size(struct file *file, loff_t offset, int whence, in generic_file_llseek_size() argument
99 return file->f_pos; in generic_file_llseek_size()
105 spin_lock(&file->f_lock); in generic_file_llseek_size()
[all …]
Deventfd.c108 static int eventfd_release(struct inode *inode, struct file *file) in eventfd_release() argument
110 struct eventfd_ctx *ctx = file->private_data; in eventfd_release()
117 static unsigned int eventfd_poll(struct file *file, poll_table *wait) in eventfd_poll() argument
119 struct eventfd_ctx *ctx = file->private_data; in eventfd_poll()
123 poll_wait(file, &ctx->wqh, wait); in eventfd_poll()
264 static ssize_t eventfd_read(struct file *file, char __user *buf, size_t count, in eventfd_read() argument
267 struct eventfd_ctx *ctx = file->private_data; in eventfd_read()
273 res = eventfd_ctx_read(ctx, file->f_flags & O_NONBLOCK, &cnt); in eventfd_read()
280 static ssize_t eventfd_write(struct file *file, const char __user *buf, size_t count, in eventfd_write() argument
283 struct eventfd_ctx *ctx = file->private_data; in eventfd_write()
[all …]
Dfile.c96 cpy = ofdt->max_fds * sizeof(struct file *); in copy_fdtable()
97 set = (nfdt->max_fds - ofdt->max_fds) * sizeof(struct file *); in copy_fdtable()
116 nr /= (1024 / sizeof(struct file *)); in alloc_fdtable()
118 nr *= (1024 / sizeof(struct file *)); in alloc_fdtable()
134 data = alloc_fdmem(nr * sizeof(struct file *)); in alloc_fdtable()
293 struct file **old_fds, **new_fds; in dup_fd()
357 struct file *f = *old_fds++; in dup_fd()
374 memset(new_fds, 0, (new_fdt->max_fds - open_files) * sizeof(struct file *)); in dup_fd()
404 struct file * file = xchg(&fdt->fd[i], NULL); in close_files() local
405 if (file) { in close_files()
[all …]
Dlibfs.c72 int dcache_dir_open(struct inode *inode, struct file *file) in dcache_dir_open() argument
74 file->private_data = d_alloc_cursor(file->f_path.dentry); in dcache_dir_open()
76 return file->private_data ? 0 : -ENOMEM; in dcache_dir_open()
80 int dcache_dir_close(struct inode *inode, struct file *file) in dcache_dir_close() argument
82 dput(file->private_data); in dcache_dir_close()
142 loff_t dcache_dir_lseek(struct file *file, loff_t offset, int whence) in dcache_dir_lseek() argument
144 struct dentry *dentry = file->f_path.dentry; in dcache_dir_lseek()
147 offset += file->f_pos; in dcache_dir_lseek()
154 if (offset != file->f_pos) { in dcache_dir_lseek()
155 file->f_pos = offset; in dcache_dir_lseek()
[all …]
Dopen.c38 unsigned int time_attrs, struct file *filp) in do_truncate2()
68 struct file *filp) in do_truncate()
185 if (!f.file) in do_sys_ftruncate()
189 if (f.file->f_flags & O_LARGEFILE) in do_sys_ftruncate()
192 dentry = f.file->f_path.dentry; in do_sys_ftruncate()
193 mnt = f.file->f_path.mnt; in do_sys_ftruncate()
196 if (!S_ISREG(inode->i_mode) || !(f.file->f_mode & FMODE_WRITE)) in do_sys_ftruncate()
209 error = locks_verify_truncate(inode, f.file, length); in do_sys_ftruncate()
211 error = security_path_truncate(&f.file->f_path); in do_sys_ftruncate()
213 error = do_truncate2(mnt, dentry, length, ATTR_MTIME|ATTR_CTIME, f.file); in do_sys_ftruncate()
[all …]
Deventpoll.c113 struct file *file; member
223 struct file *file; member
318 static inline int is_file_epoll(struct file *f) in is_file_epoll()
325 struct file *file, int fd) in ep_set_ffd() argument
327 ffd->file = file; in ep_set_ffd()
335 return (p1->file > p2->file ? +1: in ep_cmp_ffd()
336 (p1->file < p2->file ? -1 : p1->fd - p2->fd)); in ep_cmp_ffd()
706 struct file *file = epi->ffd.file; in ep_remove() local
719 spin_lock(&file->f_lock); in ep_remove()
721 spin_unlock(&file->f_lock); in ep_remove()
[all …]
Danon_inodes.c70 struct file *anon_inode_getfile(const char *name, in anon_inode_getfile()
76 struct file *file; in anon_inode_getfile() local
88 file = ERR_PTR(-ENOMEM); in anon_inode_getfile()
105 file = alloc_file(&path, OPEN_FMODE(flags), fops); in anon_inode_getfile()
106 if (IS_ERR(file)) in anon_inode_getfile()
108 file->f_mapping = anon_inode_inode->i_mapping; in anon_inode_getfile()
110 file->f_flags = flags & (O_ACCMODE | O_NONBLOCK); in anon_inode_getfile()
111 file->private_data = priv; in anon_inode_getfile()
113 return file; in anon_inode_getfile()
119 return file; in anon_inode_getfile()
[all …]
/fs/lockd/
Dsvcsubs.c45 static inline void nlm_debug_print_file(char *msg, struct nlm_file *file) in nlm_debug_print_file() argument
47 struct inode *inode = file_inode(file->f_file); in nlm_debug_print_file()
58 static inline void nlm_debug_print_file(char *msg, struct nlm_file *file) in nlm_debug_print_file() argument
86 struct nlm_file *file; in nlm_lookup_file() local
97 hlist_for_each_entry(file, &nlm_files[hash], f_list) in nlm_lookup_file()
98 if (!nfs_compare_fh(&file->f_handle, f)) in nlm_lookup_file()
104 file = kzalloc(sizeof(*file), GFP_KERNEL); in nlm_lookup_file()
105 if (!file) in nlm_lookup_file()
108 memcpy(&file->f_handle, f, sizeof(struct nfs_fh)); in nlm_lookup_file()
109 mutex_init(&file->f_mutex); in nlm_lookup_file()
[all …]
/fs/ecryptfs/
Dfile.c51 struct file *file = iocb->ki_filp; in ecryptfs_read_update_atime() local
55 path = ecryptfs_dentry_to_lower_path(file->f_path.dentry); in ecryptfs_read_update_atime()
104 static int ecryptfs_readdir(struct file *file, struct dir_context *ctx) in ecryptfs_readdir() argument
107 struct file *lower_file; in ecryptfs_readdir()
108 struct inode *inode = file_inode(file); in ecryptfs_readdir()
114 lower_file = ecryptfs_file_to_lower(file); in ecryptfs_readdir()
172 static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma) in ecryptfs_mmap() argument
174 struct file *lower_file = ecryptfs_file_to_lower(file); in ecryptfs_mmap()
182 return generic_file_mmap(file, vma); in ecryptfs_mmap()
194 static int ecryptfs_open(struct inode *inode, struct file *file) in ecryptfs_open() argument
[all …]
/fs/nfsd/
Dnfsctl.c60 static ssize_t write_filehandle(struct file *file, char *buf, size_t size);
61 static ssize_t write_unlock_ip(struct file *file, char *buf, size_t size);
62 static ssize_t write_unlock_fs(struct file *file, char *buf, size_t size);
63 static ssize_t write_threads(struct file *file, char *buf, size_t size);
64 static ssize_t write_pool_threads(struct file *file, char *buf, size_t size);
65 static ssize_t write_versions(struct file *file, char *buf, size_t size);
66 static ssize_t write_ports(struct file *file, char *buf, size_t size);
67 static ssize_t write_maxblksize(struct file *file, char *buf, size_t size);
68 static ssize_t write_maxconn(struct file *file, char *buf, size_t size);
70 static ssize_t write_leasetime(struct file *file, char *buf, size_t size);
[all …]
/fs/proc/
Dinode.c149 struct file *file; in close_pdeo() local
152 file = pdeo->file; in close_pdeo()
153 pde->proc_fops->release(file_inode(file), file); in close_pdeo()
179 static loff_t proc_reg_llseek(struct file *file, loff_t offset, int whence) in proc_reg_llseek() argument
181 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_llseek()
184 loff_t (*llseek)(struct file *, loff_t, int); in proc_reg_llseek()
188 rv = llseek(file, offset, whence); in proc_reg_llseek()
194 static ssize_t proc_reg_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) in proc_reg_read() argument
196 ssize_t (*read)(struct file *, char __user *, size_t, loff_t *); in proc_reg_read()
197 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_read()
[all …]
Dfd.c23 struct file *file = NULL; in seq_show() local
37 file = fcheck_files(files, fd); in seq_show()
38 if (file) { in seq_show()
41 f_flags = file->f_flags; in seq_show()
45 get_file(file); in seq_show()
56 (long long)file->f_pos, f_flags, in seq_show()
57 real_mount(file->f_path.mnt)->mnt_id); in seq_show()
59 show_fd_locks(m, file, files); in seq_show()
63 if (file->f_op->show_fdinfo) in seq_show()
64 file->f_op->show_fdinfo(m, file); in seq_show()
[all …]
/fs/ocfs2/
Dlocks.c38 static int ocfs2_do_flock(struct file *file, struct inode *inode, in ocfs2_do_flock() argument
42 struct ocfs2_file_private *fp = file->private_data; in ocfs2_do_flock()
69 locks_lock_file_wait(file, in ocfs2_do_flock()
75 ocfs2_file_unlock(file); in ocfs2_do_flock()
78 ret = ocfs2_file_lock(file, level, trylock); in ocfs2_do_flock()
87 ret = locks_lock_file_wait(file, fl); in ocfs2_do_flock()
89 ocfs2_file_unlock(file); in ocfs2_do_flock()
97 static int ocfs2_do_funlock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_do_funlock() argument
100 struct ocfs2_file_private *fp = file->private_data; in ocfs2_do_funlock()
103 ocfs2_file_unlock(file); in ocfs2_do_funlock()
[all …]
/fs/nfs/
Dfile.c64 nfs_file_open(struct inode *inode, struct file *filp) in nfs_file_open()
80 nfs_file_release(struct inode *inode, struct file *filp) in nfs_file_release()
101 static int nfs_revalidate_file_size(struct inode *inode, struct file *filp) in nfs_revalidate_file_size()
121 loff_t nfs_file_llseek(struct file *filp, loff_t offset, int whence) in nfs_file_llseek()
146 nfs_file_flush(struct file *file, fl_owner_t id) in nfs_file_flush() argument
148 struct inode *inode = file_inode(file); in nfs_file_flush()
150 dprintk("NFS: flush(%pD2)\n", file); in nfs_file_flush()
153 if ((file->f_mode & FMODE_WRITE) == 0) in nfs_file_flush()
157 return vfs_fsync(file, 0); in nfs_file_flush()
186 nfs_file_mmap(struct file * file, struct vm_area_struct * vma) in nfs_file_mmap() argument
[all …]
/fs/ext4/
Ddir.c30 static int ext4_dx_readdir(struct file *, struct dir_context *);
61 struct inode *dir, struct file *filp, in __ext4_check_dir_entry()
102 static int ext4_readdir(struct file *file, struct dir_context *ctx) in ext4_readdir() argument
108 struct inode *inode = file_inode(file); in ext4_readdir()
121 err = ext4_dx_readdir(file, ctx); in ext4_readdir()
129 ext4_clear_inode_flag(file_inode(file), in ext4_readdir()
135 err = ext4_read_inline_dir(file, ctx, in ext4_readdir()
163 if (!ra_has_index(&file->f_ra, index)) in ext4_readdir()
166 &file->f_ra, file, in ext4_readdir()
168 file->f_ra.prev_pos = (loff_t)index << PAGE_SHIFT; in ext4_readdir()
[all …]
/fs/ceph/
Dioctl.c16 static long ceph_ioctl_get_layout(struct file *file, void __user *arg) in ceph_ioctl_get_layout() argument
18 struct ceph_inode_info *ci = ceph_inode(file_inode(file)); in ceph_ioctl_get_layout()
22 err = ceph_do_getattr(file_inode(file), CEPH_STAT_CAP_LAYOUT, false); in ceph_ioctl_get_layout()
63 static long ceph_ioctl_set_layout(struct file *file, void __user *arg) in ceph_ioctl_set_layout() argument
65 struct inode *inode = file_inode(file); in ceph_ioctl_set_layout()
69 struct ceph_inode_info *ci = ceph_inode(file_inode(file)); in ceph_ioctl_set_layout()
77 err = ceph_do_getattr(file_inode(file), CEPH_STAT_CAP_LAYOUT, false); in ceph_ioctl_set_layout()
135 static long ceph_ioctl_set_layout_policy (struct file *file, void __user *arg) in ceph_ioctl_set_layout_policy() argument
137 struct inode *inode = file_inode(file); in ceph_ioctl_set_layout_policy()
178 static long ceph_ioctl_get_dataloc(struct file *file, void __user *arg) in ceph_ioctl_get_dataloc() argument
[all …]
/fs/orangefs/
Dfile.c300 static ssize_t do_readv_writev(enum ORANGEFS_io_type type, struct file *file, in do_readv_writev() argument
303 struct inode *inode = file->f_mapping->host; in do_readv_writev()
384 file_accessed(file); in do_readv_writev()
448 struct file *file = iocb->ki_filp; in orangefs_file_read_iter() local
458 rc = do_readv_writev(ORANGEFS_IO_READ, file, &pos, iter); in orangefs_file_read_iter()
466 struct file *file = iocb->ki_filp; in orangefs_file_write_iter() local
474 inode_lock(file->f_mapping->host); in orangefs_file_write_iter()
477 if (file->f_flags & O_APPEND) { in orangefs_file_write_iter()
478 rc = orangefs_inode_getattr(file->f_mapping->host, 0, 1); in orangefs_file_write_iter()
504 file, in orangefs_file_write_iter()
[all …]
/fs/gfs2/
Dfile.c56 static loff_t gfs2_llseek(struct file *file, loff_t offset, int whence) in gfs2_llseek() argument
58 struct gfs2_inode *ip = GFS2_I(file->f_mapping->host); in gfs2_llseek()
69 error = generic_file_llseek(file, offset, whence); in gfs2_llseek()
75 error = generic_file_llseek(file, offset, whence); in gfs2_llseek()
92 static int gfs2_readdir(struct file *file, struct dir_context *ctx) in gfs2_readdir() argument
94 struct inode *dir = file->f_mapping->host; in gfs2_readdir()
103 error = gfs2_dir_read(dir, ctx, &file->f_ra); in gfs2_readdir()
152 static int gfs2_get_flags(struct file *filp, u32 __user *ptr) in gfs2_get_flags()
213 static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask) in do_gfs2_set_flags()
291 static int gfs2_set_flags(struct file *filp, u32 __user *ptr) in gfs2_set_flags()
[all …]
/fs/efivarfs/
Dfile.c17 static ssize_t efivarfs_file_write(struct file *file, in efivarfs_file_write() argument
20 struct efivar_entry *var = file->private_data; in efivarfs_file_write()
23 struct inode *inode = file->f_mapping->host; in efivarfs_file_write()
51 d_delete(file->f_path.dentry); in efivarfs_file_write()
52 dput(file->f_path.dentry); in efivarfs_file_write()
67 static ssize_t efivarfs_file_read(struct file *file, char __user *userbuf, in efivarfs_file_read() argument
70 struct efivar_entry *var = file->private_data; in efivarfs_file_read()
108 efivarfs_ioc_getxflags(struct file *file, void __user *arg) in efivarfs_ioc_getxflags() argument
110 struct inode *inode = file->f_mapping->host; in efivarfs_ioc_getxflags()
124 efivarfs_ioc_setxflags(struct file *file, void __user *arg) in efivarfs_ioc_setxflags() argument
[all …]
/fs/cifs/
Dcifsfs.h68 struct file *, unsigned, umode_t,
79 extern int cifs_revalidate_file_attr(struct file *filp);
81 extern int cifs_revalidate_file(struct file *filp);
101 extern int cifs_open(struct inode *inode, struct file *file);
102 extern int cifs_close(struct inode *inode, struct file *file);
103 extern int cifs_closedir(struct inode *inode, struct file *file);
108 extern int cifs_lock(struct file *, int, struct file_lock *);
109 extern int cifs_fsync(struct file *, loff_t, loff_t, int);
110 extern int cifs_strict_fsync(struct file *, loff_t, loff_t, int);
111 extern int cifs_flush(struct file *, fl_owner_t id);
[all …]
/fs/fuse/
Dcontrol.c22 static struct fuse_conn *fuse_ctl_file_conn_get(struct file *file) in fuse_ctl_file_conn_get() argument
26 fc = file_inode(file)->i_private; in fuse_ctl_file_conn_get()
33 static ssize_t fuse_conn_abort_write(struct file *file, const char __user *buf, in fuse_conn_abort_write() argument
36 struct fuse_conn *fc = fuse_ctl_file_conn_get(file); in fuse_conn_abort_write()
44 static ssize_t fuse_conn_waiting_read(struct file *file, char __user *buf, in fuse_conn_waiting_read() argument
52 struct fuse_conn *fc = fuse_ctl_file_conn_get(file); in fuse_conn_waiting_read()
57 file->private_data = (void *)value; in fuse_conn_waiting_read()
60 size = sprintf(tmp, "%ld\n", (long)file->private_data); in fuse_conn_waiting_read()
64 static ssize_t fuse_conn_limit_read(struct file *file, char __user *buf, in fuse_conn_limit_read() argument
73 static ssize_t fuse_conn_limit_write(struct file *file, const char __user *buf, in fuse_conn_limit_write() argument
[all …]
Dfile.c23 static int fuse_send_open(struct fuse_conn *fc, u64 nodeid, struct file *file, in fuse_send_open() argument
30 inarg.flags = file->f_flags & ~(O_CREAT | O_EXCL | O_NOCTTY); in fuse_send_open()
117 int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file, in fuse_do_open() argument
133 err = fuse_send_open(fc, nodeid, file, opcode, &outarg); in fuse_do_open()
150 file->private_data = fuse_file_get(ff); in fuse_do_open()
156 static void fuse_link_write_file(struct file *file) in fuse_link_write_file() argument
158 struct inode *inode = file_inode(file); in fuse_link_write_file()
161 struct fuse_file *ff = file->private_data; in fuse_link_write_file()
172 void fuse_finish_open(struct inode *inode, struct file *file) in fuse_finish_open() argument
174 struct fuse_file *ff = file->private_data; in fuse_finish_open()
[all …]

12345678910>>...23