Lines Matching refs:file
30 int generic_fadvise(struct file *file, loff_t offset, loff_t len, int advice) in generic_fadvise() argument
40 inode = file_inode(file); in generic_fadvise()
44 mapping = file->f_mapping; in generic_fadvise()
79 file->f_ra.ra_pages = bdi->ra_pages; in generic_fadvise()
80 spin_lock(&file->f_lock); in generic_fadvise()
81 file->f_mode &= ~FMODE_RANDOM; in generic_fadvise()
82 spin_unlock(&file->f_lock); in generic_fadvise()
85 spin_lock(&file->f_lock); in generic_fadvise()
86 file->f_mode |= FMODE_RANDOM; in generic_fadvise()
87 spin_unlock(&file->f_lock); in generic_fadvise()
90 file->f_ra.ra_pages = bdi->ra_pages * 2; in generic_fadvise()
91 spin_lock(&file->f_lock); in generic_fadvise()
92 file->f_mode &= ~FMODE_RANDOM; in generic_fadvise()
93 spin_unlock(&file->f_lock); in generic_fadvise()
109 force_page_cache_readahead(mapping, file, start_index, nrpages); in generic_fadvise()
182 int vfs_fadvise(struct file *file, loff_t offset, loff_t len, int advice) in vfs_fadvise() argument
184 if (file->f_op->fadvise) in vfs_fadvise()
185 return file->f_op->fadvise(file, offset, len, advice); in vfs_fadvise()
187 return generic_fadvise(file, offset, len, advice); in vfs_fadvise()
198 if (!f.file) in ksys_fadvise64_64()
201 ret = vfs_fadvise(f.file, offset, len, advice); in ksys_fadvise64_64()