• Home
  • Raw
  • Download

Lines Matching refs:req

54 		struct ecryptfs_open_req *req;  in ecryptfs_threadfn()  local
66 req = list_first_entry(&ecryptfs_kthread_ctl.req_list, in ecryptfs_threadfn()
69 mutex_lock(&req->mux); in ecryptfs_threadfn()
70 list_del(&req->kthread_ctl_list); in ecryptfs_threadfn()
71 if (!(req->flags & ECRYPTFS_REQ_ZOMBIE)) { in ecryptfs_threadfn()
72 dget(req->lower_dentry); in ecryptfs_threadfn()
73 mntget(req->lower_mnt); in ecryptfs_threadfn()
74 (*req->lower_file) = dentry_open( in ecryptfs_threadfn()
75 req->lower_dentry, req->lower_mnt, in ecryptfs_threadfn()
77 req->flags |= ECRYPTFS_REQ_PROCESSED; in ecryptfs_threadfn()
79 wake_up(&req->wait); in ecryptfs_threadfn()
80 mutex_unlock(&req->mux); in ecryptfs_threadfn()
107 struct ecryptfs_open_req *req; in ecryptfs_destroy_kthread() local
111 list_for_each_entry(req, &ecryptfs_kthread_ctl.req_list, in ecryptfs_destroy_kthread()
113 mutex_lock(&req->mux); in ecryptfs_destroy_kthread()
114 req->flags |= ECRYPTFS_REQ_ZOMBIE; in ecryptfs_destroy_kthread()
115 wake_up(&req->wait); in ecryptfs_destroy_kthread()
116 mutex_unlock(&req->mux); in ecryptfs_destroy_kthread()
138 struct ecryptfs_open_req *req; in ecryptfs_privileged_open() local
150 req = kmem_cache_alloc(ecryptfs_open_req_cache, GFP_KERNEL); in ecryptfs_privileged_open()
151 if (!req) { in ecryptfs_privileged_open()
155 mutex_init(&req->mux); in ecryptfs_privileged_open()
156 req->lower_file = lower_file; in ecryptfs_privileged_open()
157 req->lower_dentry = lower_dentry; in ecryptfs_privileged_open()
158 req->lower_mnt = lower_mnt; in ecryptfs_privileged_open()
159 init_waitqueue_head(&req->wait); in ecryptfs_privileged_open()
160 req->flags = 0; in ecryptfs_privileged_open()
170 list_add_tail(&req->kthread_ctl_list, &ecryptfs_kthread_ctl.req_list); in ecryptfs_privileged_open()
173 wait_event(req->wait, (req->flags != 0)); in ecryptfs_privileged_open()
174 mutex_lock(&req->mux); in ecryptfs_privileged_open()
175 BUG_ON(req->flags == 0); in ecryptfs_privileged_open()
176 if (req->flags & ECRYPTFS_REQ_DROPPED in ecryptfs_privileged_open()
177 || req->flags & ECRYPTFS_REQ_ZOMBIE) { in ecryptfs_privileged_open()
183 if (IS_ERR(*req->lower_file)) { in ecryptfs_privileged_open()
184 rc = PTR_ERR(*req->lower_file); in ecryptfs_privileged_open()
190 rc = PTR_ERR(*req->lower_file); in ecryptfs_privileged_open()
199 mutex_unlock(&req->mux); in ecryptfs_privileged_open()
201 kmem_cache_free(ecryptfs_open_req_cache, req); in ecryptfs_privileged_open()