Lines Matching refs:ecryptfs_kthread_ctl
37 static struct ecryptfs_kthread_ctl { struct
43 } ecryptfs_kthread_ctl; argument
63 ecryptfs_kthread_ctl.wait, in ecryptfs_threadfn()
64 (!list_empty(&ecryptfs_kthread_ctl.req_list) in ecryptfs_threadfn()
66 mutex_lock(&ecryptfs_kthread_ctl.mux); in ecryptfs_threadfn()
67 if (ecryptfs_kthread_ctl.flags & ECRYPTFS_KTHREAD_ZOMBIE) { in ecryptfs_threadfn()
68 mutex_unlock(&ecryptfs_kthread_ctl.mux); in ecryptfs_threadfn()
71 while (!list_empty(&ecryptfs_kthread_ctl.req_list)) { in ecryptfs_threadfn()
72 req = list_first_entry(&ecryptfs_kthread_ctl.req_list, in ecryptfs_threadfn()
80 mutex_unlock(&ecryptfs_kthread_ctl.mux); in ecryptfs_threadfn()
90 mutex_init(&ecryptfs_kthread_ctl.mux); in ecryptfs_init_kthread()
91 init_waitqueue_head(&ecryptfs_kthread_ctl.wait); in ecryptfs_init_kthread()
92 INIT_LIST_HEAD(&ecryptfs_kthread_ctl.req_list); in ecryptfs_init_kthread()
107 mutex_lock(&ecryptfs_kthread_ctl.mux); in ecryptfs_destroy_kthread()
108 ecryptfs_kthread_ctl.flags |= ECRYPTFS_KTHREAD_ZOMBIE; in ecryptfs_destroy_kthread()
109 list_for_each_entry_safe(req, tmp, &ecryptfs_kthread_ctl.req_list, in ecryptfs_destroy_kthread()
115 mutex_unlock(&ecryptfs_kthread_ctl.mux); in ecryptfs_destroy_kthread()
117 wake_up(&ecryptfs_kthread_ctl.wait); in ecryptfs_destroy_kthread()
155 mutex_lock(&ecryptfs_kthread_ctl.mux); in ecryptfs_privileged_open()
156 if (ecryptfs_kthread_ctl.flags & ECRYPTFS_KTHREAD_ZOMBIE) { in ecryptfs_privileged_open()
158 mutex_unlock(&ecryptfs_kthread_ctl.mux); in ecryptfs_privileged_open()
164 list_add_tail(&req.kthread_ctl_list, &ecryptfs_kthread_ctl.req_list); in ecryptfs_privileged_open()
165 mutex_unlock(&ecryptfs_kthread_ctl.mux); in ecryptfs_privileged_open()
166 wake_up(&ecryptfs_kthread_ctl.wait); in ecryptfs_privileged_open()