Lines Matching refs:ecryptfs_msg_ctx_arr
39 static struct ecryptfs_msg_ctx *ecryptfs_msg_ctx_arr; variable
293 msg_ctx = &ecryptfs_msg_ctx_arr[msg->index]; in ecryptfs_process_response()
504 ecryptfs_msg_ctx_arr = kmalloc((sizeof(struct ecryptfs_msg_ctx) in ecryptfs_init_messaging()
507 if (!ecryptfs_msg_ctx_arr) { in ecryptfs_init_messaging()
516 INIT_LIST_HEAD(&ecryptfs_msg_ctx_arr[i].node); in ecryptfs_init_messaging()
517 INIT_LIST_HEAD(&ecryptfs_msg_ctx_arr[i].daemon_out_list); in ecryptfs_init_messaging()
518 mutex_init(&ecryptfs_msg_ctx_arr[i].mux); in ecryptfs_init_messaging()
519 mutex_lock(&ecryptfs_msg_ctx_arr[i].mux); in ecryptfs_init_messaging()
520 ecryptfs_msg_ctx_arr[i].index = i; in ecryptfs_init_messaging()
521 ecryptfs_msg_ctx_arr[i].state = ECRYPTFS_MSG_CTX_STATE_FREE; in ecryptfs_init_messaging()
522 ecryptfs_msg_ctx_arr[i].counter = 0; in ecryptfs_init_messaging()
523 ecryptfs_msg_ctx_arr[i].task = NULL; in ecryptfs_init_messaging()
524 ecryptfs_msg_ctx_arr[i].msg = NULL; in ecryptfs_init_messaging()
525 list_add_tail(&ecryptfs_msg_ctx_arr[i].node, in ecryptfs_init_messaging()
527 mutex_unlock(&ecryptfs_msg_ctx_arr[i].mux); in ecryptfs_init_messaging()
539 if (ecryptfs_msg_ctx_arr) { in ecryptfs_release_messaging()
544 mutex_lock(&ecryptfs_msg_ctx_arr[i].mux); in ecryptfs_release_messaging()
545 if (ecryptfs_msg_ctx_arr[i].msg) in ecryptfs_release_messaging()
546 kfree(ecryptfs_msg_ctx_arr[i].msg); in ecryptfs_release_messaging()
547 mutex_unlock(&ecryptfs_msg_ctx_arr[i].mux); in ecryptfs_release_messaging()
549 kfree(ecryptfs_msg_ctx_arr); in ecryptfs_release_messaging()