Lines Matching defs:file
10 #include <linux/file.h>
82 struct file *file;
92 file = cachefiles_cres_file(cres);
95 file, file_inode(file)->i_ino, start_pos, len,
96 i_size_read(file_inode(file)));
106 off2 = vfs_llseek(file, off, SEEK_DATA);
138 ki->iocb.ki_filp = file;
155 trace_cachefiles_read(object, file_inode(file), ki->iocb.ki_pos, len - skipped);
159 ret = vfs_iocb_iter_read(file, &ki->iocb, iter);
202 struct file *file;
212 file = cachefiles_cres_file(cres);
216 file, file_inode(file)->i_ino, start, len,
217 i_size_read(file_inode(file)));
221 off = vfs_llseek(file, start, SEEK_DATA);
231 off2 = vfs_llseek(file, off, SEEK_HOLE);
279 struct file *file,
295 file, file_inode(file)->i_ino, start_pos, len,
296 i_size_read(file_inode(file)));
306 ki->iocb.ki_filp = file;
327 trace_cachefiles_write(object, file_inode(file), ki->iocb.ki_pos, len);
331 ret = vfs_iocb_iter_write(file, &ki->iocb, iter);
388 struct file *file = cachefiles_cres_file(cres);
392 ino_t ino = file ? file_inode(file)->i_ino : 0;
410 /* The object and the file may be being created in the background. */
411 if (!file) {
415 file = cachefiles_cres_file(cres);
416 if (!file)
418 ino = file_inode(file)->i_ino;
427 off = vfs_llseek(file, start, SEEK_DATA);
433 trace_cachefiles_io_error(object, file_inode(file), off,
454 to = vfs_llseek(file, start, SEEK_HOLE);
456 trace_cachefiles_io_error(object, file_inode(file), to,
520 struct file *file,
543 pos = vfs_llseek(file, *_start, SEEK_DATA);
547 trace_cachefiles_io_error(object, file_inode(file), pos,
564 pos = vfs_llseek(file, *_start, SEEK_HOLE);
566 trace_cachefiles_io_error(object, file_inode(file), pos,
577 ret = vfs_fallocate(file, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
580 trace_cachefiles_io_error(object, file_inode(file), ret,
623 struct file *file = cachefiles_cres_file(cres);
625 if (file)
626 fput(file);
641 * Open the cache file when beginning a cache operation.
650 if (object->file) {
652 if (!cres->cache_priv2 && object->file)
653 cres->cache_priv2 = get_file(object->file);
659 pr_err("failed to get cres->file\n");