Lines Matching full:file

12 #include <linux/file.h>
29 * returns without any errors. This is to be used only for file reads.
36 struct file *file = iocb->ki_filp; in ecryptfs_read_update_atime() local
40 struct path path = ecryptfs_lower_path(file->f_path.dentry); in ecryptfs_read_update_atime()
53 * to be used only for file reads. The function to be used for directory reads
56 static ssize_t ecryptfs_splice_read_update_atime(struct file *in, loff_t *ppos, in ecryptfs_splice_read_update_atime()
121 * @file: The eCryptfs directory file
124 static int ecryptfs_readdir(struct file *file, struct dir_context *ctx) in ecryptfs_readdir() argument
127 struct file *lower_file; in ecryptfs_readdir()
128 struct inode *inode = file_inode(file); in ecryptfs_readdir()
134 lower_file = ecryptfs_file_to_lower(file); in ecryptfs_readdir()
186 static int ecryptfs_mmap(struct file *file, struct vm_area_struct *vma) in ecryptfs_mmap() argument
188 struct file *lower_file = ecryptfs_file_to_lower(file); in ecryptfs_mmap()
190 * Don't allow mmap on top of file systems that don't support it in ecryptfs_mmap()
196 return generic_file_mmap(file, vma); in ecryptfs_mmap()
201 * @inode: inode specifying file to open
202 * @file: Structure to return filled in
204 * Opens the file specified by inode.
208 static int ecryptfs_open(struct inode *inode, struct file *file) in ecryptfs_open() argument
212 struct dentry *ecryptfs_dentry = file->f_path.dentry; in ecryptfs_open()
219 ecryptfs_set_file_private(file, file_info); in ecryptfs_open()
238 "the lower file for the dentry with name " in ecryptfs_open()
244 == O_RDONLY && (file->f_flags & O_ACCMODE) != O_RDONLY) { in ecryptfs_open()
246 printk(KERN_WARNING "%s: Lower file is RO; eCryptfs " in ecryptfs_open()
247 "file must hence be opened RO\n", __func__); in ecryptfs_open()
251 file, ecryptfs_inode_to_private(inode)->lower_file); in ecryptfs_open()
263 ecryptfs_file_to_private(file)); in ecryptfs_open()
270 * @inode: inode specifying file to open
271 * @file: Structure to return filled in
273 * Opens the file specified by inode.
277 static int ecryptfs_dir_open(struct inode *inode, struct file *file) in ecryptfs_dir_open() argument
279 struct dentry *ecryptfs_dentry = file->f_path.dentry; in ecryptfs_dir_open()
283 struct file *lower_file; in ecryptfs_dir_open()
288 ecryptfs_set_file_private(file, file_info); in ecryptfs_dir_open()
295 lower_file = dentry_open(&path, file->f_flags, current_cred()); in ecryptfs_dir_open()
298 "the lower file for the dentry with name " in ecryptfs_dir_open()
304 ecryptfs_set_file_lower(file, lower_file); in ecryptfs_dir_open()
308 static int ecryptfs_flush(struct file *file, fl_owner_t td) in ecryptfs_flush() argument
310 struct file *lower_file = ecryptfs_file_to_lower(file); in ecryptfs_flush()
313 filemap_write_and_wait(file->f_mapping); in ecryptfs_flush()
320 static int ecryptfs_release(struct inode *inode, struct file *file) in ecryptfs_release() argument
324 ecryptfs_file_to_private(file)); in ecryptfs_release()
328 static int ecryptfs_dir_release(struct inode *inode, struct file *file) in ecryptfs_dir_release() argument
330 fput(ecryptfs_file_to_lower(file)); in ecryptfs_dir_release()
332 ecryptfs_file_to_private(file)); in ecryptfs_dir_release()
336 static loff_t ecryptfs_dir_llseek(struct file *file, loff_t offset, int whence) in ecryptfs_dir_llseek() argument
338 return vfs_llseek(ecryptfs_file_to_lower(file), offset, whence); in ecryptfs_dir_llseek()
342 ecryptfs_fsync(struct file *file, loff_t start, loff_t end, int datasync) in ecryptfs_fsync() argument
346 rc = file_write_and_wait(file); in ecryptfs_fsync()
350 return vfs_fsync(ecryptfs_file_to_lower(file), datasync); in ecryptfs_fsync()
353 static int ecryptfs_fasync(int fd, struct file *file, int flag) in ecryptfs_fasync() argument
356 struct file *lower_file = NULL; in ecryptfs_fasync()
358 lower_file = ecryptfs_file_to_lower(file); in ecryptfs_fasync()
365 ecryptfs_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) in ecryptfs_unlocked_ioctl() argument
367 struct file *lower_file = ecryptfs_file_to_lower(file); in ecryptfs_unlocked_ioctl()
380 fsstack_copy_attr_all(file_inode(file), file_inode(lower_file)); in ecryptfs_unlocked_ioctl()
390 ecryptfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) in ecryptfs_compat_ioctl() argument
392 struct file *lower_file = ecryptfs_file_to_lower(file); in ecryptfs_compat_ioctl()
405 fsstack_copy_attr_all(file_inode(file), file_inode(lower_file)); in ecryptfs_compat_ioctl()