aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/kthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ecryptfs/kthread.c')
-rw-r--r--fs/ecryptfs/kthread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ecryptfs/kthread.c b/fs/ecryptfs/kthread.c
index 809e67d05ca3..f1ea610362c6 100644
--- a/fs/ecryptfs/kthread.c
+++ b/fs/ecryptfs/kthread.c
@@ -102,12 +102,12 @@ int __init ecryptfs_init_kthread(void)
102 102
103void ecryptfs_destroy_kthread(void) 103void ecryptfs_destroy_kthread(void)
104{ 104{
105 struct ecryptfs_open_req *req; 105 struct ecryptfs_open_req *req, *tmp;
106 106
107 mutex_lock(&ecryptfs_kthread_ctl.mux); 107 mutex_lock(&ecryptfs_kthread_ctl.mux);
108 ecryptfs_kthread_ctl.flags |= ECRYPTFS_KTHREAD_ZOMBIE; 108 ecryptfs_kthread_ctl.flags |= ECRYPTFS_KTHREAD_ZOMBIE;
109 list_for_each_entry(req, &ecryptfs_kthread_ctl.req_list, 109 list_for_each_entry_safe(req, tmp, &ecryptfs_kthread_ctl.req_list,
110 kthread_ctl_list) { 110 kthread_ctl_list) {
111 list_del(&req->kthread_ctl_list); 111 list_del(&req->kthread_ctl_list);
112 *req->lower_file = ERR_PTR(-EIO); 112 *req->lower_file = ERR_PTR(-EIO);
113 complete(&req->done); 113 complete(&req->done);