/fs/overlayfs/ |
D | file.c | 24 static struct file *ovl_open_realfile(const struct file *file, in ovl_open_realfile() argument 27 struct inode *inode = file_inode(file); in ovl_open_realfile() 28 struct file *realfile; in ovl_open_realfile() 30 int flags = file->f_flags | O_NOATIME | FMODE_NONOTIFY; in ovl_open_realfile() 33 realfile = open_with_fake_path(&file->f_path, flags, realinode, in ovl_open_realfile() 38 file, file, ovl_whatisit(inode, realinode), file->f_flags, in ovl_open_realfile() 46 static int ovl_change_flags(struct file *file, unsigned int flags) in ovl_change_flags() argument 48 struct inode *inode = file_inode(file); in ovl_change_flags() 55 if (WARN_ON((file->f_flags ^ flags) & ~OVL_SETFL_MASK)) in ovl_change_flags() 60 if (((flags ^ file->f_flags) & O_APPEND) && IS_APPEND(inode)) in ovl_change_flags() [all …]
|
/fs/ |
D | file_table.c | 47 struct file *f = container_of(head, struct file, f_u.fu_rcuhead); in file_free_rcu() 53 static inline void file_free(struct file *f) in file_free() 96 static struct file *__alloc_file(int flags, const struct cred *cred) in __alloc_file() 98 struct file *f; in __alloc_file() 134 struct file *alloc_empty_file(int flags, const struct cred *cred) in alloc_empty_file() 137 struct file *f; in alloc_empty_file() 171 struct file *alloc_empty_file_noaccount(int flags, const struct cred *cred) in alloc_empty_file_noaccount() 173 struct file *f = __alloc_file(flags, cred); in alloc_empty_file_noaccount() 188 static struct file *alloc_file(const struct path *path, int flags, in alloc_file() 191 struct file *file; in alloc_file() local [all …]
|
D | read_write.c | 37 static inline bool unsigned_offsets(struct file *file) in unsigned_offsets() argument 39 return file->f_mode & FMODE_UNSIGNED_OFFSET; in unsigned_offsets() 54 loff_t vfs_setpos(struct file *file, loff_t offset, loff_t maxsize) in vfs_setpos() argument 56 if (offset < 0 && !unsigned_offsets(file)) in vfs_setpos() 61 if (offset != file->f_pos) { in vfs_setpos() 62 file->f_pos = offset; in vfs_setpos() 63 file->f_version = 0; in vfs_setpos() 86 generic_file_llseek_size(struct file *file, loff_t offset, int whence, in generic_file_llseek_size() argument 101 return file->f_pos; in generic_file_llseek_size() 107 spin_lock(&file->f_lock); in generic_file_llseek_size() [all …]
|
D | file.c | 77 cpy = ofdt->max_fds * sizeof(struct file *); in copy_fdtable() 78 set = (nfdt->max_fds - ofdt->max_fds) * sizeof(struct file *); in copy_fdtable() 97 nr /= (1024 / sizeof(struct file *)); in alloc_fdtable() 99 nr *= (1024 / sizeof(struct file *)); in alloc_fdtable() 115 data = kvmalloc_array(nr, sizeof(struct file *), GFP_KERNEL_ACCOUNT); in alloc_fdtable() 275 struct file **old_fds, **new_fds; in dup_fd() 339 struct file *f = *old_fds++; in dup_fd() 356 memset(new_fds, 0, (new_fdt->max_fds - open_files) * sizeof(struct file *)); in dup_fd() 386 struct file * file = xchg(&fdt->fd[i], NULL); in close_files() local 387 if (file) { in close_files() [all …]
|
D | eventfd.c | 102 static int eventfd_release(struct inode *inode, struct file *file) in eventfd_release() argument 104 struct eventfd_ctx *ctx = file->private_data; in eventfd_release() 111 static __poll_t eventfd_poll(struct file *file, poll_table *wait) in eventfd_poll() argument 113 struct eventfd_ctx *ctx = file->private_data; in eventfd_poll() 117 poll_wait(file, &ctx->wqh, wait); in eventfd_poll() 204 static ssize_t eventfd_read(struct file *file, char __user *buf, size_t count, in eventfd_read() argument 207 struct eventfd_ctx *ctx = file->private_data; in eventfd_read() 219 else if (!(file->f_flags & O_NONBLOCK)) { in eventfd_read() 251 static ssize_t eventfd_write(struct file *file, const char __user *buf, size_t count, in eventfd_write() argument 254 struct eventfd_ctx *ctx = file->private_data; in eventfd_write() [all …]
|
D | eventpoll.c | 109 struct file *file; member 219 struct file *file; member 314 static inline int is_file_epoll(struct file *f) in is_file_epoll() 321 struct file *file, int fd) in ep_set_ffd() argument 323 ffd->file = file; in ep_set_ffd() 331 return (p1->file > p2->file ? +1: in ep_cmp_ffd() 332 (p1->file < p2->file ? -1 : p1->fd - p2->fd)); in ep_cmp_ffd() 427 sock = sock_from_file(epi->ffd.file, &err); in ep_set_busy_poll_napi_id() 777 struct file *file = epi->ffd.file; in ep_remove() local 787 spin_lock(&file->f_lock); in ep_remove() [all …]
|
D | libfs.c | 76 int dcache_dir_open(struct inode *inode, struct file *file) in dcache_dir_open() argument 78 file->private_data = d_alloc_cursor(file->f_path.dentry); in dcache_dir_open() 80 return file->private_data ? 0 : -ENOMEM; in dcache_dir_open() 84 int dcache_dir_close(struct inode *inode, struct file *file) in dcache_dir_close() argument 86 dput(file->private_data); in dcache_dir_close() 133 loff_t dcache_dir_lseek(struct file *file, loff_t offset, int whence) in dcache_dir_lseek() argument 135 struct dentry *dentry = file->f_path.dentry; in dcache_dir_lseek() 138 offset += file->f_pos; in dcache_dir_lseek() 147 if (offset != file->f_pos) { in dcache_dir_lseek() 148 struct dentry *cursor = file->private_data; in dcache_dir_lseek() [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 *)vmf->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() 54 struct file *file; in sdcardfs_page_mkwrite() local 57 file = (struct file *)vmf->vma->vm_private_data; in sdcardfs_page_mkwrite() 58 lower_vm_ops = SDCARDFS_F(file)->lower_vm_ops; in sdcardfs_page_mkwrite()
|
/fs/lockd/ |
D | svcsubs.c | 46 static inline void nlm_debug_print_file(char *msg, struct nlm_file *file) in nlm_debug_print_file() argument 48 struct inode *inode = locks_inode(file->f_file); in nlm_debug_print_file() 59 static inline void nlm_debug_print_file(char *msg, struct nlm_file *file) in nlm_debug_print_file() argument 87 struct nlm_file *file; in nlm_lookup_file() local 98 hlist_for_each_entry(file, &nlm_files[hash], f_list) in nlm_lookup_file() 99 if (!nfs_compare_fh(&file->f_handle, f)) in nlm_lookup_file() 105 file = kzalloc(sizeof(*file), GFP_KERNEL); in nlm_lookup_file() 106 if (!file) in nlm_lookup_file() 109 memcpy(&file->f_handle, f, sizeof(struct nfs_fh)); in nlm_lookup_file() 110 mutex_init(&file->f_mutex); in nlm_lookup_file() [all …]
|
/fs/ecryptfs/ |
D | file.c | 37 struct file *file = iocb->ki_filp; in ecryptfs_read_update_atime() local 41 path = ecryptfs_dentry_to_lower_path(file->f_path.dentry); in ecryptfs_read_update_atime() 101 static int ecryptfs_readdir(struct file *file, struct dir_context *ctx) in ecryptfs_readdir() argument 104 struct file *lower_file; in ecryptfs_readdir() 105 struct inode *inode = file_inode(file); in ecryptfs_readdir() 111 lower_file = ecryptfs_file_to_lower(file); in ecryptfs_readdir() 169 static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma) in ecryptfs_mmap() argument 171 struct file *lower_file = ecryptfs_file_to_lower(file); in ecryptfs_mmap() 179 return generic_file_mmap(file, vma); in ecryptfs_mmap() 191 static int ecryptfs_open(struct inode *inode, struct file *file) in ecryptfs_open() argument [all …]
|
/fs/nfsd/ |
D | nfsctl.c | 64 static ssize_t write_filehandle(struct file *file, char *buf, size_t size); 65 static ssize_t write_unlock_ip(struct file *file, char *buf, size_t size); 66 static ssize_t write_unlock_fs(struct file *file, char *buf, size_t size); 67 static ssize_t write_threads(struct file *file, char *buf, size_t size); 68 static ssize_t write_pool_threads(struct file *file, char *buf, size_t size); 69 static ssize_t write_versions(struct file *file, char *buf, size_t size); 70 static ssize_t write_ports(struct file *file, char *buf, size_t size); 71 static ssize_t write_maxblksize(struct file *file, char *buf, size_t size); 72 static ssize_t write_maxconn(struct file *file, char *buf, size_t size); 74 static ssize_t write_leasetime(struct file *file, char *buf, size_t size); [all …]
|
/fs/nfs/ |
D | file.c | 65 nfs_file_open(struct inode *inode, struct file *filp) in nfs_file_open() 81 nfs_file_release(struct inode *inode, struct file *filp) in nfs_file_release() 102 static int nfs_revalidate_file_size(struct inode *inode, struct file *filp) in nfs_revalidate_file_size() 115 loff_t nfs_file_llseek(struct file *filp, loff_t offset, int whence) in nfs_file_llseek() 140 nfs_file_flush(struct file *file, fl_owner_t id) in nfs_file_flush() argument 142 struct inode *inode = file_inode(file); in nfs_file_flush() 144 dprintk("NFS: flush(%pD2)\n", file); in nfs_file_flush() 147 if ((file->f_mode & FMODE_WRITE) == 0) in nfs_file_flush() 180 nfs_file_mmap(struct file * file, struct vm_area_struct * vma) in nfs_file_mmap() argument 182 struct inode *inode = file_inode(file); in nfs_file_mmap() [all …]
|
/fs/ocfs2/ |
D | locks.c | 24 static int ocfs2_do_flock(struct file *file, struct inode *inode, in ocfs2_do_flock() argument 28 struct ocfs2_file_private *fp = file->private_data; in ocfs2_do_flock() 59 locks_lock_file_wait(file, &request); in ocfs2_do_flock() 61 ocfs2_file_unlock(file); in ocfs2_do_flock() 64 ret = ocfs2_file_lock(file, level, trylock); in ocfs2_do_flock() 73 ret = locks_lock_file_wait(file, fl); in ocfs2_do_flock() 75 ocfs2_file_unlock(file); in ocfs2_do_flock() 83 static int ocfs2_do_funlock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_do_funlock() argument 86 struct ocfs2_file_private *fp = file->private_data; in ocfs2_do_funlock() 89 ocfs2_file_unlock(file); in ocfs2_do_funlock() [all …]
|
/fs/proc/ |
D | inode.c | 160 struct file *file; in close_pdeo() local 165 file = pdeo->file; in close_pdeo() 166 pde->proc_fops->release(file_inode(file), file); in close_pdeo() 198 static loff_t proc_reg_llseek(struct file *file, loff_t offset, int whence) in proc_reg_llseek() argument 200 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_llseek() 208 rv = llseek(file, offset, whence); in proc_reg_llseek() 214 static ssize_t proc_reg_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) in proc_reg_read() argument 216 struct proc_dir_entry *pde = PDE(file_inode(file)); in proc_reg_read() 223 rv = read(file, buf, count, ppos); in proc_reg_read() 229 static ssize_t proc_reg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) in proc_reg_write() argument [all …]
|
D | fd.c | 24 struct file *file = NULL; in seq_show() local 38 file = fcheck_files(files, fd); in seq_show() 39 if (file) { in seq_show() 42 f_flags = file->f_flags; in seq_show() 46 get_file(file); in seq_show() 57 (long long)file->f_pos, f_flags, in seq_show() 58 real_mount(file->f_path.mnt)->mnt_id); in seq_show() 60 show_fd_locks(m, file, files); in seq_show() 64 if (file->f_op->show_fdinfo) in seq_show() 65 file->f_op->show_fdinfo(m, file); in seq_show() [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() 67 error = generic_file_llseek(file, offset, whence); in gfs2_llseek() 73 error = gfs2_seek_data(file, offset); in gfs2_llseek() 77 error = gfs2_seek_hole(file, offset); in gfs2_llseek() 86 error = generic_file_llseek(file, offset, whence); in gfs2_llseek() 103 static int gfs2_readdir(struct file *file, struct dir_context *ctx) in gfs2_readdir() argument 105 struct inode *dir = file->f_mapping->host; in gfs2_readdir() 114 error = gfs2_dir_read(dir, ctx, &file->f_ra); in gfs2_readdir() 156 static int gfs2_get_flags(struct file *filp, u32 __user *ptr) in gfs2_get_flags() [all …]
|
/fs/ceph/ |
D | ioctl.c | 17 static long ceph_ioctl_get_layout(struct file *file, void __user *arg) in ceph_ioctl_get_layout() argument 19 struct ceph_inode_info *ci = ceph_inode(file_inode(file)); in ceph_ioctl_get_layout() 23 err = ceph_do_getattr(file_inode(file), CEPH_STAT_CAP_LAYOUT, false); in ceph_ioctl_get_layout() 64 static long ceph_ioctl_set_layout(struct file *file, void __user *arg) in ceph_ioctl_set_layout() argument 66 struct inode *inode = file_inode(file); in ceph_ioctl_set_layout() 70 struct ceph_inode_info *ci = ceph_inode(file_inode(file)); in ceph_ioctl_set_layout() 78 err = ceph_do_getattr(file_inode(file), CEPH_STAT_CAP_LAYOUT, false); in ceph_ioctl_set_layout() 136 static long ceph_ioctl_set_layout_policy (struct file *file, void __user *arg) in ceph_ioctl_set_layout_policy() argument 138 struct inode *inode = file_inode(file); in ceph_ioctl_set_layout_policy() 179 static long ceph_ioctl_get_dataloc(struct file *file, void __user *arg) in ceph_ioctl_get_dataloc() argument [all …]
|
/fs/ext4/ |
D | dir.c | 33 static int ext4_dx_readdir(struct file *, struct dir_context *); 67 struct inode *dir, struct file *filp, in __ext4_check_dir_entry() 111 static int ext4_readdir(struct file *file, struct dir_context *ctx) in ext4_readdir() argument 117 struct inode *inode = file_inode(file); in ext4_readdir() 129 err = ext4_dx_readdir(file, ctx); in ext4_readdir() 137 ext4_clear_inode_flag(file_inode(file), in ext4_readdir() 143 err = ext4_read_inline_dir(file, ctx, in ext4_readdir() 178 if (!ra_has_index(&file->f_ra, index)) in ext4_readdir() 181 &file->f_ra, file, in ext4_readdir() 183 file->f_ra.prev_pos = (loff_t)index << PAGE_SHIFT; in ext4_readdir() [all …]
|
/fs/cifs/ |
D | cifsfs.h | 68 struct file *, unsigned, umode_t); 78 extern int cifs_revalidate_file_attr(struct file *filp); 80 extern int cifs_revalidate_file(struct file *filp); 102 extern int cifs_open(struct inode *inode, struct file *file); 103 extern int cifs_close(struct inode *inode, struct file *file); 104 extern int cifs_closedir(struct inode *inode, struct file *file); 111 extern int cifs_lock(struct file *, int, struct file_lock *); 112 extern int cifs_fsync(struct file *, loff_t, loff_t, int); 113 extern int cifs_strict_fsync(struct file *, loff_t, loff_t, int); 114 extern int cifs_flush(struct file *, fl_owner_t id); [all …]
|
/fs/efivarfs/ |
D | file.c | 15 static ssize_t efivarfs_file_write(struct file *file, in efivarfs_file_write() argument 18 struct efivar_entry *var = file->private_data; in efivarfs_file_write() 21 struct inode *inode = file->f_mapping->host; in efivarfs_file_write() 49 d_delete(file->f_path.dentry); in efivarfs_file_write() 50 dput(file->f_path.dentry); in efivarfs_file_write() 65 static ssize_t efivarfs_file_read(struct file *file, char __user *userbuf, in efivarfs_file_read() argument 68 struct efivar_entry *var = file->private_data; in efivarfs_file_read() 75 while (!__ratelimit(&file->f_cred->user->ratelimit)) { in efivarfs_file_read() 122 efivarfs_ioc_getxflags(struct file *file, void __user *arg) in efivarfs_ioc_getxflags() argument 124 struct inode *inode = file->f_mapping->host; in efivarfs_ioc_getxflags() [all …]
|
/fs/fuse/ |
D | readdir.c | 32 static void fuse_add_dirent_to_cache(struct file *file, in fuse_add_dirent_to_cache() argument 35 struct fuse_inode *fi = get_fuse_inode(file_inode(file)); in fuse_add_dirent_to_cache() 65 page = find_lock_page(file->f_mapping, index); in fuse_add_dirent_to_cache() 67 page = find_or_create_page(file->f_mapping, index, in fuse_add_dirent_to_cache() 68 mapping_gfp_mask(file->f_mapping)); in fuse_add_dirent_to_cache() 92 static void fuse_readdir_cache_end(struct file *file, loff_t pos) in fuse_readdir_cache_end() argument 94 struct fuse_inode *fi = get_fuse_inode(file_inode(file)); in fuse_readdir_cache_end() 109 truncate_inode_pages(file->f_mapping, end); in fuse_readdir_cache_end() 112 static bool fuse_emit(struct file *file, struct dir_context *ctx, in fuse_emit() argument 115 struct fuse_file *ff = file->private_data; in fuse_emit() [all …]
|
D | control.c | 23 static struct fuse_conn *fuse_ctl_file_conn_get(struct file *file) in fuse_ctl_file_conn_get() argument 27 fc = file_inode(file)->i_private; in fuse_ctl_file_conn_get() 34 static ssize_t fuse_conn_abort_write(struct file *file, const char __user *buf, in fuse_conn_abort_write() argument 37 struct fuse_conn *fc = fuse_ctl_file_conn_get(file); in fuse_conn_abort_write() 47 static ssize_t fuse_conn_waiting_read(struct file *file, char __user *buf, in fuse_conn_waiting_read() argument 55 struct fuse_conn *fc = fuse_ctl_file_conn_get(file); in fuse_conn_waiting_read() 60 file->private_data = (void *)value; in fuse_conn_waiting_read() 63 size = sprintf(tmp, "%ld\n", (long)file->private_data); in fuse_conn_waiting_read() 67 static ssize_t fuse_conn_limit_read(struct file *file, char __user *buf, in fuse_conn_limit_read() argument 76 static ssize_t fuse_conn_limit_write(struct file *file, const char __user *buf, in fuse_conn_limit_write() argument [all …]
|
/fs/orangefs/ |
D | file.c | 377 static long orangefs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) in orangefs_ioctl() argument 379 struct inode *inode = file_inode(file); in orangefs_ioctl() 438 struct file *file = vmf->vma->vm_file; in orangefs_fault() local 440 ret = orangefs_inode_getattr(file->f_mapping->host, in orangefs_fault() 461 static int orangefs_file_mmap(struct file *file, struct vm_area_struct *vma) in orangefs_file_mmap() argument 465 ret = orangefs_revalidate_mapping(file_inode(file)); in orangefs_file_mmap() 471 (file ? in orangefs_file_mmap() 472 (char *)file->f_path.dentry->d_name.name : in orangefs_file_mmap() 479 file_accessed(file); in orangefs_file_mmap() 492 static int orangefs_file_release(struct inode *inode, struct file *file) in orangefs_file_release() argument [all …]
|
/fs/configfs/ |
D | file.c | 51 static inline struct configfs_fragment *to_frag(struct file *file) in to_frag() argument 53 struct configfs_dirent *sd = file->f_path.dentry->d_fsdata; in to_frag() 58 static int fill_read_buffer(struct file *file, struct configfs_buffer *buffer) in fill_read_buffer() argument 60 struct configfs_fragment *frag = to_frag(file); in fill_read_buffer() 102 configfs_read_file(struct file *file, char __user *buf, size_t count, loff_t *ppos) in configfs_read_file() argument 104 struct configfs_buffer *buffer = file->private_data; in configfs_read_file() 109 retval = fill_read_buffer(file, buffer); in configfs_read_file() 143 configfs_read_bin_file(struct file *file, char __user *buf, in configfs_read_bin_file() argument 146 struct configfs_fragment *frag = to_frag(file); in configfs_read_bin_file() 147 struct configfs_buffer *buffer = file->private_data; in configfs_read_bin_file() [all …]
|