|
@@ -102,12 +102,12 @@ int __init ecryptfs_init_kthread(void)
|
|
|
|
|
|
void ecryptfs_destroy_kthread(void)
|
|
|
{
|
|
|
- struct ecryptfs_open_req *req;
|
|
|
+ struct ecryptfs_open_req *req, *tmp;
|
|
|
|
|
|
mutex_lock(&ecryptfs_kthread_ctl.mux);
|
|
|
ecryptfs_kthread_ctl.flags |= ECRYPTFS_KTHREAD_ZOMBIE;
|
|
|
- list_for_each_entry(req, &ecryptfs_kthread_ctl.req_list,
|
|
|
- kthread_ctl_list) {
|
|
|
+ list_for_each_entry_safe(req, tmp, &ecryptfs_kthread_ctl.req_list,
|
|
|
+ kthread_ctl_list) {
|
|
|
list_del(&req->kthread_ctl_list);
|
|
|
*req->lower_file = ERR_PTR(-EIO);
|
|
|
complete(&req->done);
|