Lines Matching refs:vnode
94 int afs_cache_wb_key(struct afs_vnode *vnode, struct afs_file *af) in afs_cache_wb_key() argument
104 spin_lock(&vnode->wb_lock); in afs_cache_wb_key()
105 list_for_each_entry(p, &vnode->wb_keys, vnode_link) { in afs_cache_wb_key()
111 list_add_tail(&wbk->vnode_link, &vnode->wb_keys); in afs_cache_wb_key()
112 spin_unlock(&vnode->wb_lock); in afs_cache_wb_key()
118 spin_unlock(&vnode->wb_lock); in afs_cache_wb_key()
129 struct afs_vnode *vnode = AFS_FS_I(inode); in afs_open() local
134 _enter("{%llx:%llu},", vnode->fid.vid, vnode->fid.vnode); in afs_open()
136 key = afs_request_key(vnode->volume->cell); in afs_open()
149 ret = afs_validate(vnode, key); in afs_open()
154 ret = afs_cache_wb_key(vnode, af); in afs_open()
160 set_bit(AFS_VNODE_NEW_CONTENT, &vnode->flags); in afs_open()
180 struct afs_vnode *vnode = AFS_FS_I(inode); in afs_release() local
184 _enter("{%llx:%llu},", vnode->fid.vid, vnode->fid.vnode); in afs_release()
194 afs_prune_wb_keys(vnode); in afs_release()
247 struct afs_vnode *vnode = op->file[0].vnode; in afs_fetch_data_success() local
251 afs_stat_v(vnode, n_fetches); in afs_fetch_data_success()
274 int afs_fetch_data(struct afs_vnode *vnode, struct afs_read *req) in afs_fetch_data() argument
279 vnode->volume->name, in afs_fetch_data()
280 vnode->fid.vid, in afs_fetch_data()
281 vnode->fid.vnode, in afs_fetch_data()
282 vnode->fid.unique, in afs_fetch_data()
285 op = afs_alloc_operation(req->key, vnode->volume); in afs_fetch_data()
292 afs_op_set_vnode(op, 0, vnode); in afs_fetch_data()
301 struct afs_vnode *vnode = AFS_FS_I(subreq->rreq->inode); in afs_req_issue_op() local
312 fsreq->vnode = vnode; in afs_req_issue_op()
316 &fsreq->vnode->vfs_inode.i_mapping->i_pages, in afs_req_issue_op()
319 afs_fetch_data(fsreq->vnode, fsreq); in afs_req_issue_op()
325 struct afs_vnode *vnode = AFS_FS_I(page->mapping->host); in afs_symlink_readpage() local
336 fsreq->vnode = vnode; in afs_symlink_readpage()
341 ret = afs_fetch_data(fsreq->vnode, fsreq); in afs_symlink_readpage()
362 struct afs_vnode *vnode = AFS_FS_I(rreq->inode); in afs_begin_cache_operation() local
364 return fscache_begin_read_operation(rreq, afs_vnode_cache(vnode)); in afs_begin_cache_operation()
370 struct afs_vnode *vnode = AFS_FS_I(file_inode(file)); in afs_check_write_begin() local
372 return test_bit(AFS_VNODE_DELETED, &vnode->flags) ? -ESTALE : 0; in afs_check_write_begin()
408 struct afs_vnode *vnode = AFS_FS_I(folio_inode(folio)); in afs_invalidate_dirty() local
447 trace_afs_folio_dirty(vnode, tracepoint_string("trunc"), folio); in afs_invalidate_dirty()
451 trace_afs_folio_dirty(vnode, tracepoint_string("undirty"), folio); in afs_invalidate_dirty()
454 trace_afs_folio_dirty(vnode, tracepoint_string("inval"), folio); in afs_invalidate_dirty()
486 struct afs_vnode *vnode = AFS_FS_I(folio_inode(folio)); in afs_releasepage() local
489 vnode->fid.vid, vnode->fid.vnode, folio_index(folio), folio->flags, in afs_releasepage()
503 trace_afs_folio_dirty(vnode, tracepoint_string("rel"), folio); in afs_releasepage()
512 static void afs_add_open_mmap(struct afs_vnode *vnode) in afs_add_open_mmap() argument
514 if (atomic_inc_return(&vnode->cb_nr_mmap) == 1) { in afs_add_open_mmap()
515 down_write(&vnode->volume->cell->fs_open_mmaps_lock); in afs_add_open_mmap()
517 if (list_empty(&vnode->cb_mmap_link)) in afs_add_open_mmap()
518 list_add_tail(&vnode->cb_mmap_link, in afs_add_open_mmap()
519 &vnode->volume->cell->fs_open_mmaps); in afs_add_open_mmap()
521 up_write(&vnode->volume->cell->fs_open_mmaps_lock); in afs_add_open_mmap()
525 static void afs_drop_open_mmap(struct afs_vnode *vnode) in afs_drop_open_mmap() argument
527 if (!atomic_dec_and_test(&vnode->cb_nr_mmap)) in afs_drop_open_mmap()
530 down_write(&vnode->volume->cell->fs_open_mmaps_lock); in afs_drop_open_mmap()
532 if (atomic_read(&vnode->cb_nr_mmap) == 0) in afs_drop_open_mmap()
533 list_del_init(&vnode->cb_mmap_link); in afs_drop_open_mmap()
535 up_write(&vnode->volume->cell->fs_open_mmaps_lock); in afs_drop_open_mmap()
536 flush_work(&vnode->cb_work); in afs_drop_open_mmap()
544 struct afs_vnode *vnode = AFS_FS_I(file_inode(file)); in afs_file_mmap() local
547 afs_add_open_mmap(vnode); in afs_file_mmap()
553 afs_drop_open_mmap(vnode); in afs_file_mmap()
569 struct afs_vnode *vnode = AFS_FS_I(file_inode(vmf->vma->vm_file)); in afs_vm_map_pages() local
572 switch (afs_validate(vnode, af->key)) { in afs_vm_map_pages()
588 struct afs_vnode *vnode = AFS_FS_I(file_inode(iocb->ki_filp)); in afs_file_read_iter() local
592 ret = afs_validate(vnode, af->key); in afs_file_read_iter()