Lines Matching refs:ctx
57 struct aa_file_ctx *ctx; in aa_alloc_file_ctx() local
59 ctx = kzalloc(sizeof(struct aa_file_ctx), gfp); in aa_alloc_file_ctx()
60 if (ctx) { in aa_alloc_file_ctx()
61 spin_lock_init(&ctx->lock); in aa_alloc_file_ctx()
62 rcu_assign_pointer(ctx->label, aa_get_label(label)); in aa_alloc_file_ctx()
64 return ctx; in aa_alloc_file_ctx()
71 static inline void aa_free_file_ctx(struct aa_file_ctx *ctx) in aa_free_file_ctx() argument
73 if (ctx) { in aa_free_file_ctx()
74 aa_put_label(rcu_access_pointer(ctx->label)); in aa_free_file_ctx()
75 kzfree(ctx); in aa_free_file_ctx()
79 static inline struct aa_label *aa_get_file_label(struct aa_file_ctx *ctx) in aa_get_file_label() argument
81 return aa_get_label_rcu(&ctx->label); in aa_get_file_label()