Lines Matching defs:file
2 /* AFS filesystem file handling
21 static int afs_file_mmap(struct file *file, struct vm_area_struct *vma);
22 static int afs_symlink_read_folio(struct file *file, struct folio *folio);
28 static ssize_t afs_file_splice_read(struct file *in, loff_t *ppos,
128 * open an AFS file or directory and attach a key to it
130 int afs_open(struct inode *inode, struct file *file)
156 if (file->f_mode & FMODE_WRITE) {
162 if (file->f_flags & O_TRUNC)
165 fscache_use_cookie(afs_vnode_cache(vnode), file->f_mode & FMODE_WRITE);
167 file->private_data = af;
181 * release an AFS file or directory and discard its key
183 int afs_release(struct inode *inode, struct file *file)
187 struct afs_file *af = file->private_data;
193 if ((file->f_mode & FMODE_WRITE))
194 ret = vfs_fsync(file, 0);
196 file->private_data = NULL;
200 if ((file->f_mode & FMODE_WRITE)) {
263 struct afs_vnode *vnode = op->file[0].vnode;
266 afs_vnode_commit_status(op, &op->file[0]);
288 * Fetch file data from the volume.
339 static int afs_symlink_read_folio(struct file *file, struct folio *folio)
363 static int afs_init_request(struct netfs_io_request *rreq, struct file *file)
365 rreq->netfs_priv = key_get(afs_file_key(file));
381 static int afs_check_write_begin(struct file *file, loff_t pos, unsigned len,
384 struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
545 * Handle setting up a memory mapping on an AFS file.
547 static int afs_file_mmap(struct file *file, struct vm_area_struct *vma)
549 struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
554 ret = generic_file_mmap(file, vma);
594 static ssize_t afs_file_splice_read(struct file *in, loff_t *ppos,