Lines Matching refs:ecryptfs_kthread_ctl

23 static struct ecryptfs_kthread_ctl {  struct
29 } ecryptfs_kthread_ctl; argument
49 ecryptfs_kthread_ctl.wait, in ecryptfs_threadfn()
50 (!list_empty(&ecryptfs_kthread_ctl.req_list) in ecryptfs_threadfn()
52 mutex_lock(&ecryptfs_kthread_ctl.mux); in ecryptfs_threadfn()
53 if (ecryptfs_kthread_ctl.flags & ECRYPTFS_KTHREAD_ZOMBIE) { in ecryptfs_threadfn()
54 mutex_unlock(&ecryptfs_kthread_ctl.mux); in ecryptfs_threadfn()
57 while (!list_empty(&ecryptfs_kthread_ctl.req_list)) { in ecryptfs_threadfn()
58 req = list_first_entry(&ecryptfs_kthread_ctl.req_list, in ecryptfs_threadfn()
66 mutex_unlock(&ecryptfs_kthread_ctl.mux); in ecryptfs_threadfn()
76 mutex_init(&ecryptfs_kthread_ctl.mux); in ecryptfs_init_kthread()
77 init_waitqueue_head(&ecryptfs_kthread_ctl.wait); in ecryptfs_init_kthread()
78 INIT_LIST_HEAD(&ecryptfs_kthread_ctl.req_list); in ecryptfs_init_kthread()
93 mutex_lock(&ecryptfs_kthread_ctl.mux); in ecryptfs_destroy_kthread()
94 ecryptfs_kthread_ctl.flags |= ECRYPTFS_KTHREAD_ZOMBIE; in ecryptfs_destroy_kthread()
95 list_for_each_entry_safe(req, tmp, &ecryptfs_kthread_ctl.req_list, in ecryptfs_destroy_kthread()
101 mutex_unlock(&ecryptfs_kthread_ctl.mux); in ecryptfs_destroy_kthread()
103 wake_up(&ecryptfs_kthread_ctl.wait); in ecryptfs_destroy_kthread()
142 mutex_lock(&ecryptfs_kthread_ctl.mux); in ecryptfs_privileged_open()
143 if (ecryptfs_kthread_ctl.flags & ECRYPTFS_KTHREAD_ZOMBIE) { in ecryptfs_privileged_open()
145 mutex_unlock(&ecryptfs_kthread_ctl.mux); in ecryptfs_privileged_open()
151 list_add_tail(&req.kthread_ctl_list, &ecryptfs_kthread_ctl.req_list); in ecryptfs_privileged_open()
152 mutex_unlock(&ecryptfs_kthread_ctl.mux); in ecryptfs_privileged_open()
153 wake_up(&ecryptfs_kthread_ctl.wait); in ecryptfs_privileged_open()