Lines Matching refs:fi
91 struct fuse_inode *fi; in fuse_alloc_inode() local
93 fi = kmem_cache_alloc(fuse_inode_cachep, GFP_KERNEL); in fuse_alloc_inode()
94 if (!fi) in fuse_alloc_inode()
97 fi->i_time = 0; in fuse_alloc_inode()
98 fi->inval_mask = 0; in fuse_alloc_inode()
100 fi->backing_inode = NULL; in fuse_alloc_inode()
101 fi->bpf = NULL; in fuse_alloc_inode()
103 fi->nodeid = 0; in fuse_alloc_inode()
104 fi->nlookup = 0; in fuse_alloc_inode()
105 fi->attr_version = 0; in fuse_alloc_inode()
106 fi->orig_ino = 0; in fuse_alloc_inode()
107 fi->state = 0; in fuse_alloc_inode()
108 fi->submount_lookup = NULL; in fuse_alloc_inode()
109 mutex_init(&fi->mutex); in fuse_alloc_inode()
110 spin_lock_init(&fi->lock); in fuse_alloc_inode()
111 fi->forget = fuse_alloc_forget(); in fuse_alloc_inode()
112 if (!fi->forget) in fuse_alloc_inode()
115 if (IS_ENABLED(CONFIG_FUSE_DAX) && !fuse_dax_inode_alloc(sb, fi)) in fuse_alloc_inode()
118 return &fi->inode; in fuse_alloc_inode()
121 kfree(fi->forget); in fuse_alloc_inode()
123 kmem_cache_free(fuse_inode_cachep, fi); in fuse_alloc_inode()
129 struct fuse_inode *fi = get_fuse_inode(inode); in fuse_free_inode() local
131 mutex_destroy(&fi->mutex); in fuse_free_inode()
132 kfree(fi->forget); in fuse_free_inode()
134 kfree(fi->dax); in fuse_free_inode()
137 if (fi->bpf) in fuse_free_inode()
138 bpf_prog_put(fi->bpf); in fuse_free_inode()
140 kmem_cache_free(fuse_inode_cachep, fi); in fuse_free_inode()
156 struct fuse_inode *fi = get_fuse_inode(inode); in fuse_evict_inode() local
167 if (fi->nlookup) { in fuse_evict_inode()
168 fuse_queue_forget(fc, fi->forget, fi->nodeid, in fuse_evict_inode()
169 fi->nlookup); in fuse_evict_inode()
170 fi->forget = NULL; in fuse_evict_inode()
173 if (fi->submount_lookup) { in fuse_evict_inode()
174 fuse_cleanup_submount_lookup(fc, fi->submount_lookup); in fuse_evict_inode()
175 fi->submount_lookup = NULL; in fuse_evict_inode()
179 WARN_ON(!list_empty(&fi->write_files)); in fuse_evict_inode()
180 WARN_ON(!list_empty(&fi->queued_writes)); in fuse_evict_inode()
187 struct fuse_inode *fi = get_fuse_inode(inode); in fuse_destroy_inode() local
189 iput(fi->backing_inode); in fuse_destroy_inode()
242 struct fuse_inode *fi = get_fuse_inode(inode); in fuse_change_attributes_common() local
244 lockdep_assert_held(&fi->lock); in fuse_change_attributes_common()
246 fi->attr_version = atomic64_inc_return(&fc->attr_version); in fuse_change_attributes_common()
247 fi->i_time = attr_valid; in fuse_change_attributes_common()
248 WRITE_ONCE(fi->inval_mask, 0); in fuse_change_attributes_common()
282 fi->orig_i_mode = inode->i_mode; in fuse_change_attributes_common()
286 fi->orig_ino = attr->ino; in fuse_change_attributes_common()
303 struct fuse_inode *fi = get_fuse_inode(inode); in fuse_change_attributes() local
308 spin_lock(&fi->lock); in fuse_change_attributes()
309 if ((attr_version != 0 && fi->attr_version > attr_version) || in fuse_change_attributes()
310 test_bit(FUSE_I_SIZE_UNSTABLE, &fi->state)) { in fuse_change_attributes()
311 spin_unlock(&fi->lock); in fuse_change_attributes()
326 spin_unlock(&fi->lock); in fuse_change_attributes()
393 struct fuse_inode *fi = get_fuse_inode(inode); in fuse_inode_eq() local
395 return fii->nodeid == fi->nodeid; in fuse_inode_eq()
402 struct fuse_inode *fi = get_fuse_inode(inode); in fuse_inode_backing_eq() local
404 return fii->nodeid == fi->nodeid in fuse_inode_backing_eq()
406 && fii->backing_inode == fi->backing_inode in fuse_inode_backing_eq()
415 struct fuse_inode *fi = get_fuse_inode(inode); in fuse_inode_set() local
417 fi->nodeid = fii->nodeid; in fuse_inode_set()
426 struct fuse_inode *fi = get_fuse_inode(inode); in fuse_inode_backing_set() local
428 fi->nodeid = fii->nodeid; in fuse_inode_backing_set()
430 fi->backing_inode = fii->backing_inode; in fuse_inode_backing_set()
431 if (fi->backing_inode) in fuse_inode_backing_set()
432 ihold(fi->backing_inode); in fuse_inode_backing_set()
442 struct fuse_inode *fi; in fuse_iget_backing() local
468 fi = get_fuse_inode(inode); in fuse_iget_backing()
470 spin_lock(&fi->lock); in fuse_iget_backing()
471 fi->nlookup++; in fuse_iget_backing()
472 spin_unlock(&fi->lock); in fuse_iget_backing()
482 struct fuse_inode *fi; in fuse_iget() local
497 struct fuse_inode *fi; in fuse_iget() local
504 fi = get_fuse_inode(inode); in fuse_iget()
505 fi->nodeid = nodeid; in fuse_iget()
506 fi->submount_lookup = fuse_alloc_submount_lookup(); in fuse_iget()
507 if (!fi->submount_lookup) { in fuse_iget()
512 fuse_init_submount_lookup(fi->submount_lookup, nodeid); in fuse_iget()
535 fi = get_fuse_inode(inode); in fuse_iget()
536 spin_lock(&fi->lock); in fuse_iget()
537 fi->nlookup++; in fuse_iget()
538 spin_unlock(&fi->lock); in fuse_iget()
573 struct fuse_inode *fi; in fuse_reverse_inval_inode() local
582 fi = get_fuse_inode(inode); in fuse_reverse_inval_inode()
583 spin_lock(&fi->lock); in fuse_reverse_inval_inode()
584 fi->attr_version = atomic64_inc_return(&fc->attr_version); in fuse_reverse_inval_inode()
585 spin_unlock(&fi->lock); in fuse_reverse_inval_inode()
1617 struct fuse_inode *fi; in fuse_fill_super_submount() local
1640 fi = get_fuse_inode(root); in fuse_fill_super_submount()
1641 fi->nlookup--; in fuse_fill_super_submount()
1658 fi->submount_lookup = sl; in fuse_fill_super_submount()