Lines Matching refs:permits
53 struct afs_permits *permits = in afs_zap_permits() local
57 _enter("{%d}", permits->count); in afs_zap_permits()
59 for (loop = permits->count - 1; loop >= 0; loop--) in afs_zap_permits()
60 key_put(permits->permits[loop].key); in afs_zap_permits()
61 kfree(permits); in afs_zap_permits()
69 struct afs_permits *permits = in afs_dispose_of_permits() local
72 _enter("{%d}", permits->count); in afs_dispose_of_permits()
74 kfree(permits); in afs_dispose_of_permits()
111 struct afs_permits *permits; in afs_clear_permits() local
116 permits = vnode->permits; in afs_clear_permits()
117 rcu_assign_pointer(vnode->permits, NULL); in afs_clear_permits()
120 if (permits) in afs_clear_permits()
121 call_rcu(&permits->rcu, afs_zap_permits); in afs_clear_permits()
131 struct afs_permits *permits, *xpermits; in afs_cache_permit() local
169 xpermits = auth_vnode->permits; in afs_cache_permit()
176 permit = xpermits->permits; in afs_cache_permit()
187 permits = kmalloc(sizeof(*permits) + sizeof(*permit) * (count + 1), in afs_cache_permit()
189 if (!permits) in afs_cache_permit()
193 memcpy(permits->permits, xpermits->permits, in afs_cache_permit()
198 permits->permits[count].access_mask = vnode->status.caller_access; in afs_cache_permit()
199 permits->permits[count].key = key_get(key); in afs_cache_permit()
200 permits->count = count + 1; in afs_cache_permit()
202 rcu_assign_pointer(auth_vnode->permits, permits); in afs_cache_permit()
220 struct afs_permits *permits; in afs_check_permit() local
246 permits = rcu_dereference(auth_vnode->permits); in afs_check_permit()
247 if (permits) { in afs_check_permit()
248 permit = permits->permits; in afs_check_permit()
249 for (loop = permits->count; loop > 0; loop--) { in afs_check_permit()