/fs/ |
D | file_table.c | 42 struct file *f = container_of(head, struct file, f_u.fu_rcuhead); in file_free_rcu() 48 static inline void file_free(struct file *f) in file_free() 76 int proc_nr_files(ctl_table *table, int write, struct file *filp, in proc_nr_files() 83 int proc_nr_files(ctl_table *table, int write, struct file *filp, in proc_nr_files() 100 struct file *get_empty_filp(void) in get_empty_filp() 104 struct file * f; in get_empty_filp() 166 struct file *alloc_file(struct vfsmount *mnt, struct dentry *dentry, in alloc_file() 169 struct file *file; in alloc_file() local 172 file = get_empty_filp(); in alloc_file() 173 if (!file) in alloc_file() [all …]
|
D | read_write.c | 44 generic_file_llseek_unlocked(struct file *file, loff_t offset, int origin) in generic_file_llseek_unlocked() argument 46 struct inode *inode = file->f_mapping->host; in generic_file_llseek_unlocked() 60 return file->f_pos; in generic_file_llseek_unlocked() 61 offset += file->f_pos; in generic_file_llseek_unlocked() 69 if (offset != file->f_pos) { in generic_file_llseek_unlocked() 70 file->f_pos = offset; in generic_file_llseek_unlocked() 71 file->f_version = 0; in generic_file_llseek_unlocked() 88 loff_t generic_file_llseek(struct file *file, loff_t offset, int origin) in generic_file_llseek() argument 92 mutex_lock(&file->f_dentry->d_inode->i_mutex); in generic_file_llseek() 93 rval = generic_file_llseek_unlocked(file, offset, origin); in generic_file_llseek() [all …]
|
D | timerfd.c | 81 static int timerfd_release(struct inode *inode, struct file *file) in timerfd_release() argument 83 struct timerfd_ctx *ctx = file->private_data; in timerfd_release() 90 static unsigned int timerfd_poll(struct file *file, poll_table *wait) in timerfd_poll() argument 92 struct timerfd_ctx *ctx = file->private_data; in timerfd_poll() 96 poll_wait(file, &ctx->wqh, wait); in timerfd_poll() 106 static ssize_t timerfd_read(struct file *file, char __user *buf, size_t count, in timerfd_read() argument 109 struct timerfd_ctx *ctx = file->private_data; in timerfd_read() 118 if (!ctx->ticks && !(file->f_flags & O_NONBLOCK)) { in timerfd_read() 165 static struct file *timerfd_fget(int fd) in timerfd_fget() 167 struct file *file; in timerfd_fget() local [all …]
|
D | eventfd.c | 41 int eventfd_signal(struct file *file, int n) in eventfd_signal() argument 43 struct eventfd_ctx *ctx = file->private_data; in eventfd_signal() 59 static int eventfd_release(struct inode *inode, struct file *file) in eventfd_release() argument 61 kfree(file->private_data); in eventfd_release() 65 static unsigned int eventfd_poll(struct file *file, poll_table *wait) in eventfd_poll() argument 67 struct eventfd_ctx *ctx = file->private_data; in eventfd_poll() 71 poll_wait(file, &ctx->wqh, wait); in eventfd_poll() 85 static ssize_t eventfd_read(struct file *file, char __user *buf, size_t count, in eventfd_read() argument 88 struct eventfd_ctx *ctx = file->private_data; in eventfd_read() 100 else if (!(file->f_flags & O_NONBLOCK)) { in eventfd_read() [all …]
|
D | bad_inode.c | 19 static loff_t bad_file_llseek(struct file *file, loff_t offset, int origin) in bad_file_llseek() argument 24 static ssize_t bad_file_read(struct file *filp, char __user *buf, in bad_file_read() 30 static ssize_t bad_file_write(struct file *filp, const char __user *buf, in bad_file_write() 48 static int bad_file_readdir(struct file *filp, void *dirent, filldir_t filldir) in bad_file_readdir() 53 static unsigned int bad_file_poll(struct file *filp, poll_table *wait) in bad_file_poll() 58 static int bad_file_ioctl (struct inode *inode, struct file *filp, in bad_file_ioctl() 64 static long bad_file_unlocked_ioctl(struct file *file, unsigned cmd, in bad_file_unlocked_ioctl() argument 70 static long bad_file_compat_ioctl(struct file *file, unsigned int cmd, in bad_file_compat_ioctl() argument 76 static int bad_file_mmap(struct file *file, struct vm_area_struct *vma) in bad_file_mmap() argument 81 static int bad_file_open(struct inode *inode, struct file *filp) in bad_file_open() [all …]
|
D | libfs.c | 58 int simple_sync_file(struct file * file, struct dentry *dentry, int datasync) in simple_sync_file() argument 63 int dcache_dir_open(struct inode *inode, struct file *file) in dcache_dir_open() argument 67 file->private_data = d_alloc(file->f_path.dentry, &cursor_name); in dcache_dir_open() 69 return file->private_data ? 0 : -ENOMEM; in dcache_dir_open() 72 int dcache_dir_close(struct inode *inode, struct file *file) in dcache_dir_close() argument 74 dput(file->private_data); in dcache_dir_close() 78 loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin) in dcache_dir_lseek() argument 80 mutex_lock(&file->f_path.dentry->d_inode->i_mutex); in dcache_dir_lseek() 83 offset += file->f_pos; in dcache_dir_lseek() 88 mutex_unlock(&file->f_path.dentry->d_inode->i_mutex); in dcache_dir_lseek() [all …]
|
D | open.c | 161 struct file * file; in SYSCALL_DEFINE2() local 166 file = fget(fd); in SYSCALL_DEFINE2() 167 if (!file) in SYSCALL_DEFINE2() 169 error = vfs_statfs_native(file->f_path.dentry, &tmp); in SYSCALL_DEFINE2() 172 fput(file); in SYSCALL_DEFINE2() 179 struct file * file; in SYSCALL_DEFINE3() local 187 file = fget(fd); in SYSCALL_DEFINE3() 188 if (!file) in SYSCALL_DEFINE3() 190 error = vfs_statfs64(file->f_path.dentry, &tmp); in SYSCALL_DEFINE3() 193 fput(file); in SYSCALL_DEFINE3() [all …]
|
D | readdir.c | 22 int vfs_readdir(struct file *file, filldir_t filler, void *buf) in vfs_readdir() argument 24 struct inode *inode = file->f_path.dentry->d_inode; in vfs_readdir() 26 if (!file->f_op || !file->f_op->readdir) in vfs_readdir() 29 res = security_file_permission(file, MAY_READ); in vfs_readdir() 39 res = file->f_op->readdir(file, buf, filler); in vfs_readdir() 40 file_accessed(file); in vfs_readdir() 109 struct file * file; in SYSCALL_DEFINE3() local 113 file = fget(fd); in SYSCALL_DEFINE3() 114 if (!file) in SYSCALL_DEFINE3() 120 error = vfs_readdir(file, fillonedir, &buf); in SYSCALL_DEFINE3() [all …]
|
D | sync.c | 55 int file_fsync(struct file *filp, struct dentry *dentry, int datasync) in file_fsync() 91 int vfs_fsync(struct file *file, struct dentry *dentry, int datasync) in vfs_fsync() argument 102 if (file) { in vfs_fsync() 103 mapping = file->f_mapping; in vfs_fsync() 104 fop = file->f_op; in vfs_fsync() 122 err = fop->fsync(file, dentry, datasync); in vfs_fsync() 136 struct file *file; in do_fsync() local 139 file = fget(fd); in do_fsync() 140 if (file) { in do_fsync() 141 ret = vfs_fsync(file, file->f_path.dentry, datasync); in do_fsync() [all …]
|
D | binfmt_aout.c | 34 static int load_aout_library(struct file*); 35 static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit); 67 static int dump_write(struct file *file, const void *addr, int nr) in dump_write() argument 69 return file->f_op->write(file, addr, nr, &file->f_pos) == nr; in dump_write() 73 if (!dump_write(file, (void *)(addr), (nr))) \ 77 if (file->f_op->llseek) { \ 78 if (file->f_op->llseek(file,(offset),0) != (offset)) \ 80 } else file->f_pos = (offset) 92 static int aout_core_dump(long signr, struct pt_regs *regs, struct file *file, unsigned long limit) in aout_core_dump() argument 232 …i_size_read(bprm->file->f_path.dentry->d_inode) < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) { in load_aout_binary() [all …]
|
/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->f_file->f_path.dentry->d_inode; 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 87 struct nlm_file *file; in nlm_lookup_file() local 98 hlist_for_each_entry(file, pos, &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/nfsd/ |
D | nfsctl.c | 79 static ssize_t write_svc(struct file *file, char *buf, size_t size); 80 static ssize_t write_add(struct file *file, char *buf, size_t size); 81 static ssize_t write_del(struct file *file, char *buf, size_t size); 82 static ssize_t write_export(struct file *file, char *buf, size_t size); 83 static ssize_t write_unexport(struct file *file, char *buf, size_t size); 84 static ssize_t write_getfd(struct file *file, char *buf, size_t size); 85 static ssize_t write_getfs(struct file *file, char *buf, size_t size); 86 static ssize_t write_filehandle(struct file *file, char *buf, size_t size); 87 static ssize_t write_unlock_ip(struct file *file, char *buf, size_t size); 88 static ssize_t write_unlock_fs(struct file *file, char *buf, size_t size); [all …]
|
/fs/ecryptfs/ |
D | file.c | 53 struct file *file = iocb->ki_filp; in ecryptfs_read_update_atime() local 63 lower_dentry = ecryptfs_dentry_to_lower(file->f_path.dentry); in ecryptfs_read_update_atime() 64 lower_vfsmount = ecryptfs_dentry_to_lower_mnt(file->f_path.dentry); in ecryptfs_read_update_atime() 113 static int ecryptfs_readdir(struct file *file, void *dirent, filldir_t filldir) in ecryptfs_readdir() argument 116 struct file *lower_file; in ecryptfs_readdir() 120 lower_file = ecryptfs_file_to_lower(file); in ecryptfs_readdir() 121 lower_file->f_pos = file->f_pos; in ecryptfs_readdir() 122 inode = file->f_path.dentry->d_inode; in ecryptfs_readdir() 125 buf.dentry = file->f_path.dentry; in ecryptfs_readdir() 130 file->f_pos = lower_file->f_pos; in ecryptfs_readdir() [all …]
|
/fs/ocfs2/ |
D | locks.c | 39 static int ocfs2_do_flock(struct file *file, struct inode *inode, in ocfs2_do_flock() argument 43 struct ocfs2_file_private *fp = file->private_data; in ocfs2_do_flock() 70 flock_lock_file_wait(file, in ocfs2_do_flock() 73 ocfs2_file_unlock(file); in ocfs2_do_flock() 76 ret = ocfs2_file_lock(file, level, trylock); in ocfs2_do_flock() 85 ret = flock_lock_file_wait(file, fl); in ocfs2_do_flock() 93 static int ocfs2_do_funlock(struct file *file, int cmd, struct file_lock *fl) in ocfs2_do_funlock() argument 96 struct ocfs2_file_private *fp = file->private_data; in ocfs2_do_funlock() 99 ocfs2_file_unlock(file); in ocfs2_do_funlock() 100 ret = flock_lock_file_wait(file, fl); in ocfs2_do_funlock() [all …]
|
D | stack_user.c | 168 static inline void ocfs2_control_set_handshake_state(struct file *file, in ocfs2_control_set_handshake_state() argument 171 struct ocfs2_control_private *p = file->private_data; in ocfs2_control_set_handshake_state() 175 static inline int ocfs2_control_get_handshake_state(struct file *file) in ocfs2_control_get_handshake_state() argument 177 struct ocfs2_control_private *p = file->private_data; in ocfs2_control_get_handshake_state() 261 static ssize_t ocfs2_control_validate_protocol(struct file *file, in ocfs2_control_validate_protocol() argument 276 ocfs2_control_set_handshake_state(file, in ocfs2_control_validate_protocol() 306 static int ocfs2_control_install_private(struct file *file) in ocfs2_control_install_private() argument 310 struct ocfs2_control_private *p = file->private_data; in ocfs2_control_install_private() 345 ocfs2_control_set_handshake_state(file, in ocfs2_control_install_private() 366 static int ocfs2_control_do_setnode_msg(struct file *file, in ocfs2_control_do_setnode_msg() argument [all …]
|
/fs/afs/ |
D | proc.c | 23 static int afs_proc_cells_open(struct inode *inode, struct file *file); 28 static ssize_t afs_proc_cells_write(struct file *file, const char __user *buf, 47 static int afs_proc_rootcell_open(struct inode *inode, struct file *file); 48 static int afs_proc_rootcell_release(struct inode *inode, struct file *file); 49 static ssize_t afs_proc_rootcell_read(struct file *file, char __user *buf, 51 static ssize_t afs_proc_rootcell_write(struct file *file, 64 static int afs_proc_cell_volumes_open(struct inode *inode, struct file *file); 66 struct file *file); 89 struct file *file); 91 struct file *file); [all …]
|
/fs/proc/ |
D | inode.c | 137 static loff_t proc_reg_llseek(struct file *file, loff_t offset, int whence) in proc_reg_llseek() argument 139 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); in proc_reg_llseek() 141 loff_t (*llseek)(struct file *, loff_t, int); in proc_reg_llseek() 166 rv = llseek(file, offset, whence); in proc_reg_llseek() 172 static ssize_t proc_reg_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) in proc_reg_read() argument 174 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); in proc_reg_read() 176 ssize_t (*read)(struct file *, char __user *, size_t, loff_t *); in proc_reg_read() 188 rv = read(file, buf, count, ppos); in proc_reg_read() 194 static ssize_t proc_reg_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) in proc_reg_write() argument 196 struct proc_dir_entry *pde = PDE(file->f_path.dentry->d_inode); in proc_reg_write() [all …]
|
/fs/gfs2/ |
D | ops_file.c | 55 static loff_t gfs2_llseek(struct file *file, loff_t offset, int origin) in gfs2_llseek() argument 57 struct gfs2_inode *ip = GFS2_I(file->f_mapping->host); in gfs2_llseek() 65 error = generic_file_llseek_unlocked(file, offset, origin); in gfs2_llseek() 69 error = generic_file_llseek_unlocked(file, offset, origin); in gfs2_llseek() 83 static int gfs2_readdir(struct file *file, void *dirent, filldir_t filldir) in gfs2_readdir() argument 85 struct inode *dir = file->f_mapping->host; in gfs2_readdir() 88 u64 offset = file->f_pos; in gfs2_readdir() 102 file->f_pos = offset; in gfs2_readdir() 147 static int gfs2_get_flags(struct file *filp, u32 __user *ptr) in gfs2_get_flags() 204 static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask) in do_gfs2_set_flags() [all …]
|
/fs/cifs/ |
D | cifsfs.h | 65 extern int cifs_open(struct inode *inode, struct file *file); 66 extern int cifs_close(struct inode *inode, struct file *file); 67 extern int cifs_closedir(struct inode *inode, struct file *file); 68 extern ssize_t cifs_user_read(struct file *file, char __user *read_data, 70 extern ssize_t cifs_user_write(struct file *file, const char __user *write_data, 72 extern int cifs_lock(struct file *, int, struct file_lock *); 73 extern int cifs_fsync(struct file *, struct dentry *, int); 74 extern int cifs_flush(struct file *, fl_owner_t id); 75 extern int cifs_file_mmap(struct file * , struct vm_area_struct *); 77 extern int cifs_dir_open(struct inode *inode, struct file *file); [all …]
|
D | file.c | 44 struct file *file, __u16 netfid) in cifs_init_private() argument 52 private_data->pfile = file; /* needed for writepage */ in cifs_init_private() 100 static inline int cifs_open_inode_helper(struct inode *inode, struct file *file, in cifs_open_inode_helper() argument 111 if ((file->f_flags & O_ACCMODE) == O_WRONLY) { in cifs_open_inode_helper() 129 if (timespec_equal(&file->f_path.dentry->d_inode->i_mtime, &temp) && in cifs_open_inode_helper() 130 (file->f_path.dentry->d_inode->i_size == in cifs_open_inode_helper() 134 if (file->f_path.dentry->d_inode->i_mapping) { in cifs_open_inode_helper() 137 rc = filemap_write_and_wait(file->f_path.dentry->d_inode->i_mapping); in cifs_open_inode_helper() 139 CIFS_I(file->f_path.dentry->d_inode)->write_behind_rc = rc; in cifs_open_inode_helper() 143 invalidate_remote_inode(file->f_path.dentry->d_inode); in cifs_open_inode_helper() [all …]
|
/fs/smbfs/ |
D | file.c | 32 smb_fsync(struct file *file, struct dentry * dentry, int datasync) in smb_fsync() argument 103 smb_readpage(struct file *file, struct page *page) in smb_readpage() argument 106 struct dentry *dentry = file->f_path.dentry; in smb_readpage() 206 smb_updatepage(struct file *file, struct page *page, unsigned long offset, in smb_updatepage() argument 209 struct dentry *dentry = file->f_path.dentry; in smb_updatepage() 221 struct file * file = iocb->ki_filp; in smb_file_aio_read() local 222 struct dentry * dentry = file->f_path.dentry; in smb_file_aio_read() 245 smb_file_mmap(struct file * file, struct vm_area_struct * vma) in smb_file_mmap() argument 247 struct dentry * dentry = file->f_path.dentry; in smb_file_mmap() 259 status = generic_file_mmap(file, vma); in smb_file_mmap() [all …]
|
/fs/nfs/ |
D | file.c | 41 static int nfs_file_open(struct inode *, struct file *); 42 static int nfs_file_release(struct inode *, struct file *); 43 static loff_t nfs_file_llseek(struct file *file, loff_t offset, int origin); 44 static int nfs_file_mmap(struct file *, struct vm_area_struct *); 45 static ssize_t nfs_file_splice_read(struct file *filp, loff_t *ppos, 52 static int nfs_file_flush(struct file *, fl_owner_t id); 53 static int nfs_file_fsync(struct file *, struct dentry *dentry, int datasync); 55 static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl); 56 static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl); 57 static int nfs_setlease(struct file *file, long arg, struct file_lock **fl); [all …]
|
/fs/xfs/linux-2.6/ |
D | xfs_file.c | 55 struct file *file = iocb->ki_filp; in xfs_file_aio_read() local 59 if (unlikely(file->f_flags & O_DIRECT)) in xfs_file_aio_read() 61 if (file->f_mode & FMODE_NOCMTIME) in xfs_file_aio_read() 63 return xfs_read(XFS_I(file->f_path.dentry->d_inode), iocb, iov, in xfs_file_aio_read() 74 struct file *file = iocb->ki_filp; in xfs_file_aio_write() local 78 if (unlikely(file->f_flags & O_DIRECT)) in xfs_file_aio_write() 80 if (file->f_mode & FMODE_NOCMTIME) in xfs_file_aio_write() 82 return xfs_write(XFS_I(file->f_mapping->host), iocb, iov, nr_segs, in xfs_file_aio_write() 88 struct file *infilp, in xfs_file_splice_read() 106 struct file *outfilp, in xfs_file_splice_write() [all …]
|
/fs/fuse/ |
D | file.c | 18 static int fuse_send_open(struct inode *inode, struct file *file, int isdir, in fuse_send_open() argument 31 inarg.flags = file->f_flags & ~(O_CREAT | O_EXCL | O_NOCTTY); in fuse_send_open() 101 void fuse_finish_open(struct inode *inode, struct file *file, in fuse_finish_open() argument 105 file->f_op = &fuse_direct_io_file_operations; in fuse_finish_open() 109 nonseekable_open(inode, file); in fuse_finish_open() 111 file->private_data = fuse_file_get(ff); in fuse_finish_open() 114 int fuse_open_common(struct inode *inode, struct file *file, int isdir) in fuse_open_common() argument 122 if (file->f_flags & O_DIRECT) in fuse_open_common() 125 err = generic_file_open(inode, file); in fuse_open_common() 133 err = fuse_send_open(inode, file, isdir, &outarg); in fuse_open_common() [all …]
|
/fs/hppfs/ |
D | hppfs.c | 29 struct file *proc_file; 108 static int file_removed(struct dentry *dentry, const char *file) in file_removed() argument 114 if (file != NULL) in file_removed() 115 extra += strlen(file) + 1; in file_removed() 123 if (file != NULL) { in file_removed() 125 strcat(host_file, file); in file_removed() 190 static ssize_t read_proc(struct file *file, char __user *buf, ssize_t count, in read_proc() argument 193 ssize_t (*read)(struct file *, char __user *, size_t, loff_t *); in read_proc() 196 read = file->f_path.dentry->d_inode->i_fop->read; in read_proc() 201 n = (*read)(file, buf, count, &file->f_pos); in read_proc() [all …]
|