Lines Matching full:file
9 #include <linux/file.h>
34 int hmdfs_file_open_cloud(struct inode *inode, struct file *file) in hmdfs_file_open_cloud() argument
39 struct file *lower_file; in hmdfs_file_open_cloud()
59 dir_path = hmdfs_get_dentry_relative_path(file->f_path.dentry); in hmdfs_file_open_cloud()
67 file->f_flags | O_DIRECT, file->f_mode); in hmdfs_file_open_cloud()
75 file->private_data = gfi; in hmdfs_file_open_cloud()
81 int hmdfs_file_release_cloud(struct inode *inode, struct file *file) in hmdfs_file_release_cloud() argument
83 struct hmdfs_file_info *gfi = hmdfs_f(file); in hmdfs_file_release_cloud()
85 file->private_data = NULL; in hmdfs_file_release_cloud()
91 static int hmdfs_file_flush_cloud(struct file *file, fl_owner_t id) in hmdfs_file_flush_cloud() argument
93 struct hmdfs_file_info *gfi = hmdfs_f(file); in hmdfs_file_flush_cloud()
103 int hmdfs_file_mmap_cloud(struct file *file, struct vm_area_struct *vma) in hmdfs_file_mmap_cloud() argument
105 struct hmdfs_file_info *private_data = file->private_data; in hmdfs_file_mmap_cloud()
106 struct file *realfile = NULL; in hmdfs_file_mmap_cloud()
119 if (WARN_ON(file != vma->vm_file)) in hmdfs_file_mmap_cloud()
127 fput(file); in hmdfs_file_mmap_cloud()
129 file_accessed(file); in hmdfs_file_mmap_cloud()
134 static int hmdfs_do_readpages_cloud(struct file *filp, int cnt, in hmdfs_do_readpages_cloud()
138 struct file *lower_filp; in hmdfs_do_readpages_cloud()
186 static int hmdfs_readpages_cloud(struct file *filp, in hmdfs_readpages_cloud()
234 static int hmdfs_readpage(struct file *file, struct page *page) in hmdfs_readpage() argument
239 struct hmdfs_file_info *gfi = file->private_data; in hmdfs_readpage()
240 struct file *lower_file; in hmdfs_readpage()
295 struct file *file, struct file *handler, in analysis_dentry_file_from_cloud() argument
371 static int hmdfs_iterate_cloud(struct file *file, struct dir_context *ctx) in hmdfs_iterate_cloud() argument
379 file->f_inode->i_sb->s_fs_info, file, file->private_data, ctx); in hmdfs_iterate_cloud()
384 trace_hmdfs_iterate_remote(file->f_path.dentry, start_pos, ctx->pos, in hmdfs_iterate_cloud()
389 int hmdfs_dir_open_cloud(struct inode *inode, struct file *file) in hmdfs_dir_open_cloud() argument
393 get_cloud_cache_file(file->f_path.dentry, file->f_inode->i_sb->s_fs_info); in hmdfs_dir_open_cloud()
395 file->f_path.dentry); in hmdfs_dir_open_cloud()
397 file->private_data = cache_item->filp; in hmdfs_dir_open_cloud()
398 get_file(file->private_data); in hmdfs_dir_open_cloud()
406 static int hmdfs_dir_release_cloud(struct inode *inode, struct file *file) in hmdfs_dir_release_cloud() argument
408 if (file->private_data) in hmdfs_dir_release_cloud()
409 fput(file->private_data); in hmdfs_dir_release_cloud()
410 file->private_data = NULL; in hmdfs_dir_release_cloud()