25 #include <linux/slab.h>
26 #include <linux/wait.h>
37 static struct ecryptfs_kthread_ctl {
38 #define ECRYPTFS_KTHREAD_ZOMBIE 0x00000001
43 } ecryptfs_kthread_ctl;
56 static int ecryptfs_threadfn(
void *
ignored)
63 ecryptfs_kthread_ctl.wait,
64 (!list_empty(&ecryptfs_kthread_ctl.req_list)
71 while (!list_empty(&ecryptfs_kthread_ctl.req_list)) {
92 INIT_LIST_HEAD(&ecryptfs_kthread_ctl.req_list);
95 if (IS_ERR(ecryptfs_kthread)) {
96 rc = PTR_ERR(ecryptfs_kthread);
117 wake_up(&ecryptfs_kthread_ctl.wait);
131 struct dentry *lower_dentry,
139 init_completion(&req.
done);
141 req.
path.dentry = lower_dentry;
142 req.
path.mnt = lower_mnt;
149 if (!IS_ERR(*lower_file))
152 rc = PTR_ERR((*lower_file));
160 "aborting privileged request to open lower file\n",
166 wake_up(&ecryptfs_kthread_ctl.wait);
168 if (IS_ERR(*lower_file))
169 rc = PTR_ERR(*lower_file);