diff options
Diffstat (limited to 'kernel/padata.c')
-rw-r--r-- | kernel/padata.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/padata.c b/kernel/padata.c index 57ec4eb5f2e3..ae8defcf0622 100644 --- a/kernel/padata.c +++ b/kernel/padata.c | |||
@@ -111,10 +111,13 @@ int padata_do_parallel(struct padata_instance *pinst, | |||
111 | 111 | ||
112 | pd = rcu_dereference(pinst->pd); | 112 | pd = rcu_dereference(pinst->pd); |
113 | 113 | ||
114 | err = 0; | 114 | err = -EINVAL; |
115 | if (!(pinst->flags & PADATA_INIT)) | 115 | if (!(pinst->flags & PADATA_INIT)) |
116 | goto out; | 116 | goto out; |
117 | 117 | ||
118 | if (!cpumask_test_cpu(cb_cpu, pd->cpumask)) | ||
119 | goto out; | ||
120 | |||
118 | err = -EBUSY; | 121 | err = -EBUSY; |
119 | if ((pinst->flags & PADATA_RESET)) | 122 | if ((pinst->flags & PADATA_RESET)) |
120 | goto out; | 123 | goto out; |
@@ -122,11 +125,7 @@ int padata_do_parallel(struct padata_instance *pinst, | |||
122 | if (atomic_read(&pd->refcnt) >= MAX_OBJ_NUM) | 125 | if (atomic_read(&pd->refcnt) >= MAX_OBJ_NUM) |
123 | goto out; | 126 | goto out; |
124 | 127 | ||
125 | err = -EINVAL; | 128 | err = 0; |
126 | if (!cpumask_test_cpu(cb_cpu, pd->cpumask)) | ||
127 | goto out; | ||
128 | |||
129 | err = -EINPROGRESS; | ||
130 | atomic_inc(&pd->refcnt); | 129 | atomic_inc(&pd->refcnt); |
131 | padata->pd = pd; | 130 | padata->pd = pd; |
132 | padata->cb_cpu = cb_cpu; | 131 | padata->cb_cpu = cb_cpu; |