Lines Matching refs:ctx
58 struct aa_file_ctx *ctx; in aa_alloc_file_ctx() local
60 ctx = kzalloc(sizeof(struct aa_file_ctx), gfp); in aa_alloc_file_ctx()
61 if (ctx) { in aa_alloc_file_ctx()
62 spin_lock_init(&ctx->lock); in aa_alloc_file_ctx()
63 rcu_assign_pointer(ctx->label, aa_get_label(label)); in aa_alloc_file_ctx()
65 return ctx; in aa_alloc_file_ctx()
72 static inline void aa_free_file_ctx(struct aa_file_ctx *ctx) in aa_free_file_ctx() argument
74 if (ctx) { in aa_free_file_ctx()
75 aa_put_label(rcu_access_pointer(ctx->label)); in aa_free_file_ctx()
76 kzfree(ctx); in aa_free_file_ctx()
80 static inline struct aa_label *aa_get_file_label(struct aa_file_ctx *ctx) in aa_get_file_label() argument
82 return aa_get_label_rcu(&ctx->label); in aa_get_file_label()