/fs/ |
D | read_write.c | 24 typedef ssize_t (*io_fn_t)(struct file *, char __user *, size_t, loff_t *); 36 static inline int unsigned_offsets(struct file *file) in unsigned_offsets() argument 38 return file->f_mode & FMODE_UNSIGNED_OFFSET; in unsigned_offsets() 53 loff_t vfs_setpos(struct file *file, loff_t offset, loff_t maxsize) in vfs_setpos() argument 55 if (offset < 0 && !unsigned_offsets(file)) in vfs_setpos() 60 if (offset != file->f_pos) { in vfs_setpos() 61 file->f_pos = offset; in vfs_setpos() 62 file->f_version = 0; in vfs_setpos() 85 generic_file_llseek_size(struct file *file, loff_t offset, int whence, in generic_file_llseek_size() argument 100 return file->f_pos; in generic_file_llseek_size() [all …]
|
D | file_table.c | 46 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 …]
|
D | file.c | 95 cpy = ofdt->max_fds * sizeof(struct file *); in copy_fdtable() 96 set = (nfdt->max_fds - ofdt->max_fds) * sizeof(struct file *); in copy_fdtable() 115 nr /= (1024 / sizeof(struct file *)); in alloc_fdtable() 117 nr *= (1024 / sizeof(struct file *)); in alloc_fdtable() 133 data = alloc_fdmem(nr * sizeof(struct file *)); in alloc_fdtable() 292 struct file **old_fds, **new_fds; in dup_fd() 356 struct file *f = *old_fds++; in dup_fd() 373 memset(new_fds, 0, (new_fdt->max_fds - open_files) * sizeof(struct file *)); in dup_fd() 403 struct file * file = xchg(&fdt->fd[i], NULL); in close_files() local 404 if (file) { in close_files() [all …]
|
D | eventfd.c | 108 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() 226 static ssize_t eventfd_read(struct file *file, char __user *buf, size_t count, in eventfd_read() argument 229 struct eventfd_ctx *ctx = file->private_data; in eventfd_read() 235 res = eventfd_ctx_read(ctx, file->f_flags & O_NONBLOCK, &cnt); in eventfd_read() 242 static ssize_t eventfd_write(struct file *file, const char __user *buf, size_t count, in eventfd_write() argument 245 struct eventfd_ctx *ctx = file->private_data; in eventfd_write() [all …]
|
D | eventpoll.c | 108 struct file *file; member 218 struct file *file; member 311 static inline int is_file_epoll(struct file *f) in is_file_epoll() 318 struct file *file, int fd) in ep_set_ffd() argument 320 ffd->file = file; in ep_set_ffd() 328 return (p1->file > p2->file ? +1: in ep_cmp_ffd() 329 (p1->file < p2->file ? -1 : p1->fd - p2->fd)); in ep_cmp_ffd() 699 struct file *file = epi->ffd.file; in ep_remove() local 712 spin_lock(&file->f_lock); in ep_remove() 714 spin_unlock(&file->f_lock); in ep_remove() [all …]
|
D | libfs.c | 72 int dcache_dir_open(struct inode *inode, struct file *file) in dcache_dir_open() argument 76 file->private_data = d_alloc(file->f_path.dentry, &cursor_name); in dcache_dir_open() 78 return file->private_data ? 0 : -ENOMEM; in dcache_dir_open() 82 int dcache_dir_close(struct inode *inode, struct file *file) in dcache_dir_close() argument 84 dput(file->private_data); in dcache_dir_close() 89 loff_t dcache_dir_lseek(struct file *file, loff_t offset, int whence) in dcache_dir_lseek() argument 91 struct dentry *dentry = file->f_path.dentry; in dcache_dir_lseek() 95 offset += file->f_pos; in dcache_dir_lseek() 103 if (offset != file->f_pos) { in dcache_dir_lseek() 104 file->f_pos = offset; in dcache_dir_lseek() [all …]
|
D | anon_inodes.c | 70 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/sdcardfs/ |
D | file.c | 26 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 …]
|
D | mmap.c | 26 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/lockd/ |
D | svcsubs.c | 45 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/ |
D | file.c | 51 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/ |
D | nfsctl.c | 60 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/ |
D | inode.c | 149 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 …]
|
D | fd.c | 23 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/ |
D | locks.c | 38 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/ |
D | file.c | 64 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() 184 nfs_file_splice_read(struct file *filp, loff_t *ppos, in nfs_file_splice_read() [all …]
|
/fs/ext4/ |
D | dir.c | 30 static int ext4_dx_readdir(struct file *, struct dir_context *); 61 struct inode *dir, struct file *filp, in __ext4_check_dir_entry() 105 static int ext4_readdir(struct file *file, struct dir_context *ctx) in ext4_readdir() argument 111 struct inode *inode = file_inode(file); in ext4_readdir() 124 err = ext4_dx_readdir(file, ctx); in ext4_readdir() 140 err = ext4_read_inline_dir(file, ctx, in ext4_readdir() 164 if (!ra_has_index(&file->f_ra, index)) in ext4_readdir() 167 &file->f_ra, file, in ext4_readdir() 169 file->f_ra.prev_pos = (loff_t)index << PAGE_CACHE_SHIFT; in ext4_readdir() 177 EXT4_ERROR_FILE(file, 0, in ext4_readdir() [all …]
|
/fs/ceph/ |
D | ioctl.c | 16 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/efivarfs/ |
D | file.c | 17 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/ |
D | cifsfs.h | 58 struct file *, unsigned, umode_t, 69 extern int cifs_revalidate_file_attr(struct file *filp); 71 extern int cifs_revalidate_file(struct file *filp); 91 extern int cifs_open(struct inode *inode, struct file *file); 92 extern int cifs_close(struct inode *inode, struct file *file); 93 extern int cifs_closedir(struct inode *inode, struct file *file); 98 extern int cifs_lock(struct file *, int, struct file_lock *); 99 extern int cifs_fsync(struct file *, loff_t, loff_t, int); 100 extern int cifs_strict_fsync(struct file *, loff_t, loff_t, int); 101 extern int cifs_flush(struct file *, fl_owner_t id); [all …]
|
/fs/fuse/ |
D | control.c | 22 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 …]
|
D | file.c | 24 static int fuse_send_open(struct fuse_conn *fc, u64 nodeid, struct file *file, in fuse_send_open() argument 31 inarg.flags = file->f_flags & ~(O_CREAT | O_EXCL | O_NOCTTY); in fuse_send_open() 118 int fuse_do_open(struct fuse_conn *fc, u64 nodeid, struct file *file, in fuse_do_open() argument 134 err = fuse_send_open(fc, nodeid, file, opcode, &outarg); in fuse_do_open() 151 file->private_data = fuse_file_get(ff); in fuse_do_open() 157 static void fuse_link_write_file(struct file *file) in fuse_link_write_file() argument 159 struct inode *inode = file_inode(file); in fuse_link_write_file() 162 struct fuse_file *ff = file->private_data; in fuse_link_write_file() 173 void fuse_finish_open(struct inode *inode, struct file *file) in fuse_finish_open() argument 175 struct fuse_file *ff = file->private_data; in fuse_finish_open() [all …]
|
D | fuse_i.h | 258 struct file *file; member 266 .file = f, \ 389 struct file *stolen_file; 713 void fuse_force_forget(struct file *file, u64 nodeid); 718 void fuse_read_fill(struct fuse_req *req, struct file *file, 724 int fuse_open_common(struct inode *inode, struct file *file, bool isdir); 729 void fuse_finish_open(struct inode *inode, struct file *file); 736 void fuse_release_common(struct file *file, int opcode); 741 int fuse_fsync_common(struct file *file, loff_t start, loff_t end, 821 struct file *file); [all …]
|
/fs/gfs2/ |
D | file.c | 56 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() 212 static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask) in do_gfs2_set_flags() 290 static int gfs2_set_flags(struct file *filp, u32 __user *ptr) in gfs2_set_flags() [all …]
|
/fs/kernfs/ |
D | file.c | 55 static struct kernfs_open_file *kernfs_of(struct file *file) in kernfs_of() argument 57 return ((struct seq_file *)file->private_data)->private; in kernfs_of() 243 static ssize_t kernfs_fop_read(struct file *file, char __user *user_buf, in kernfs_fop_read() argument 246 struct kernfs_open_file *of = kernfs_of(file); in kernfs_fop_read() 249 return seq_read(file, user_buf, count, ppos); in kernfs_fop_read() 270 static ssize_t kernfs_fop_write(struct file *file, const char __user *user_buf, in kernfs_fop_write() argument 273 struct kernfs_open_file *of = kernfs_of(file); in kernfs_fop_write() 330 struct file *file = vma->vm_file; in kernfs_vma_open() local 331 struct kernfs_open_file *of = kernfs_of(file); in kernfs_vma_open() 347 struct file *file = vma->vm_file; in kernfs_vma_fault() local [all …]
|