Lines Matching refs:vnode

107 void afs_clear_permits(struct afs_vnode *vnode)  in afs_clear_permits()  argument
111 spin_lock(&vnode->lock); in afs_clear_permits()
112 permits = rcu_dereference_protected(vnode->permit_cache, in afs_clear_permits()
113 lockdep_is_held(&vnode->lock)); in afs_clear_permits()
114 RCU_INIT_POINTER(vnode->permit_cache, NULL); in afs_clear_permits()
115 spin_unlock(&vnode->lock); in afs_clear_permits()
143 void afs_cache_permit(struct afs_vnode *vnode, struct key *key, in afs_cache_permit() argument
153 vnode->fid.vid, vnode->fid.vnode, key_serial(key), caller_access); in afs_cache_permit()
160 permits = rcu_dereference(vnode->permit_cache); in afs_cache_permit()
173 if (afs_cb_is_broken(cb_break, vnode)) { in afs_cache_permit()
191 spin_lock(&vnode->lock); in afs_cache_permit()
192 if (permits != rcu_access_pointer(vnode->permit_cache)) in afs_cache_permit()
194 RCU_INIT_POINTER(vnode->permit_cache, NULL); in afs_cache_permit()
195 spin_unlock(&vnode->lock); in afs_cache_permit()
203 if (afs_cb_is_broken(cb_break, vnode)) in afs_cache_permit()
281 spin_lock(&vnode->lock); in afs_cache_permit()
282 zap = rcu_access_pointer(vnode->permit_cache); in afs_cache_permit()
283 if (!afs_cb_is_broken(cb_break, vnode) && zap == permits) in afs_cache_permit()
284 rcu_assign_pointer(vnode->permit_cache, replacement); in afs_cache_permit()
287 spin_unlock(&vnode->lock); in afs_cache_permit()
295 spin_unlock(&vnode->lock); in afs_cache_permit()
304 static bool afs_check_permit_rcu(struct afs_vnode *vnode, struct key *key, in afs_check_permit_rcu() argument
311 vnode->fid.vid, vnode->fid.vnode, key_serial(key)); in afs_check_permit_rcu()
314 if (key == vnode->volume->cell->anonymous_key) { in afs_check_permit_rcu()
315 *_access = vnode->status.anon_access; in afs_check_permit_rcu()
320 permits = rcu_dereference(vnode->permit_cache); in afs_check_permit_rcu()
343 int afs_check_permit(struct afs_vnode *vnode, struct key *key, in afs_check_permit() argument
351 vnode->fid.vid, vnode->fid.vnode, key_serial(key)); in afs_check_permit()
354 if (key == vnode->volume->cell->anonymous_key) { in afs_check_permit()
356 *_access = vnode->status.anon_access; in afs_check_permit()
360 permits = rcu_dereference(vnode->permit_cache); in afs_check_permit()
382 ret = afs_fetch_status(vnode, key, false, _access); in afs_check_permit()
402 struct afs_vnode *vnode = AFS_FS_I(inode); in afs_permission() local
408 vnode->fid.vid, vnode->fid.vnode, vnode->flags, mask); in afs_permission()
411 key = afs_request_key_rcu(vnode->volume->cell); in afs_permission()
416 if (!afs_check_validity(vnode) || in afs_permission()
417 !afs_check_permit_rcu(vnode, key, &access)) in afs_permission()
420 key = afs_request_key(vnode->volume->cell); in afs_permission()
426 ret = afs_validate(vnode, key); in afs_permission()
431 ret = afs_check_permit(vnode, key, &access); in afs_permission()