Lines Matching full:file

26 #include <linux/file.h>
43 * returns without any errors. This is to be used only for file reads.
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()
109 * @file: The eCryptfs directory file
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()
152 static int ecryptfs_file_mmap(struct file *file, struct vm_area_struct *vma) in ecryptfs_file_mmap() argument
156 rc = generic_file_mmap(file, vma); in ecryptfs_file_mmap()
167 * @inode: inode speciying file to open
168 * @file: Structure to return filled in
170 * Opens the file specified by inode.
174 static int ecryptfs_open(struct inode *inode, struct file *file) in ecryptfs_open() argument
179 struct dentry *ecryptfs_dentry = file->f_path.dentry; in ecryptfs_open()
188 && ((file->f_flags & O_WRONLY) || (file->f_flags & O_RDWR) in ecryptfs_open()
189 || (file->f_flags & O_CREAT) || (file->f_flags & O_TRUNC) in ecryptfs_open()
190 || (file->f_flags & O_APPEND))) { in ecryptfs_open()
198 ecryptfs_set_file_private(file, file_info); in ecryptfs_open()
218 "the lower file for the dentry with name " in ecryptfs_open()
224 == O_RDONLY && (file->f_flags & O_ACCMODE) != O_RDONLY) { in ecryptfs_open()
226 printk(KERN_WARNING "%s: Lower file is RO; eCryptfs " in ecryptfs_open()
227 "file must hence be opened RO\n", __func__); in ecryptfs_open()
231 file, ecryptfs_inode_to_private(inode)->lower_file); in ecryptfs_open()
250 printk(KERN_WARNING "Either the lower file " in ecryptfs_open()
274 ecryptfs_file_to_private(file)); in ecryptfs_open()
279 static int ecryptfs_flush(struct file *file, fl_owner_t td) in ecryptfs_flush() argument
281 return file->f_mode & FMODE_WRITE in ecryptfs_flush()
282 ? filemap_write_and_wait(file->f_mapping) : 0; in ecryptfs_flush()
285 static int ecryptfs_release(struct inode *inode, struct file *file) in ecryptfs_release() argument
289 ecryptfs_file_to_private(file)); in ecryptfs_release()
294 ecryptfs_fsync(struct file *file, loff_t start, loff_t end, int datasync) in ecryptfs_fsync() argument
298 rc = generic_file_fsync(file, start, end, datasync); in ecryptfs_fsync()
301 rc = vfs_fsync_range(ecryptfs_file_to_lower(file), start, end, in ecryptfs_fsync()
307 static int ecryptfs_fasync(int fd, struct file *file, int flag) in ecryptfs_fasync() argument
310 struct file *lower_file = NULL; in ecryptfs_fasync()
312 lower_file = ecryptfs_file_to_lower(file); in ecryptfs_fasync()
319 ecryptfs_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) in ecryptfs_unlocked_ioctl() argument
321 struct file *lower_file = NULL; in ecryptfs_unlocked_ioctl()
324 if (ecryptfs_file_to_private(file)) in ecryptfs_unlocked_ioctl()
325 lower_file = ecryptfs_file_to_lower(file); in ecryptfs_unlocked_ioctl()
333 ecryptfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) in ecryptfs_compat_ioctl() argument
335 struct file *lower_file = NULL; in ecryptfs_compat_ioctl()
338 if (ecryptfs_file_to_private(file)) in ecryptfs_compat_ioctl()
339 lower_file = ecryptfs_file_to_lower(file); in ecryptfs_compat_ioctl()