diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/workqueue.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 7daafdc2514b..7f28c32d9aca 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -149,19 +149,27 @@ struct execute_work { | |||
149 | 149 | ||
150 | extern struct workqueue_struct * | 150 | extern struct workqueue_struct * |
151 | __create_workqueue_key(const char *name, int singlethread, | 151 | __create_workqueue_key(const char *name, int singlethread, |
152 | int freezeable, struct lock_class_key *key); | 152 | int freezeable, struct lock_class_key *key, |
153 | const char *lock_name); | ||
153 | 154 | ||
154 | #ifdef CONFIG_LOCKDEP | 155 | #ifdef CONFIG_LOCKDEP |
155 | #define __create_workqueue(name, singlethread, freezeable) \ | 156 | #define __create_workqueue(name, singlethread, freezeable) \ |
156 | ({ \ | 157 | ({ \ |
157 | static struct lock_class_key __key; \ | 158 | static struct lock_class_key __key; \ |
159 | const char *__lock_name; \ | ||
160 | \ | ||
161 | if (__builtin_constant_p(name)) \ | ||
162 | __lock_name = (name); \ | ||
163 | else \ | ||
164 | __lock_name = #name; \ | ||
158 | \ | 165 | \ |
159 | __create_workqueue_key((name), (singlethread), \ | 166 | __create_workqueue_key((name), (singlethread), \ |
160 | (freezeable), &__key); \ | 167 | (freezeable), &__key, \ |
168 | __lock_name); \ | ||
161 | }) | 169 | }) |
162 | #else | 170 | #else |
163 | #define __create_workqueue(name, singlethread, freezeable) \ | 171 | #define __create_workqueue(name, singlethread, freezeable) \ |
164 | __create_workqueue_key((name), (singlethread), (freezeable), NULL) | 172 | __create_workqueue_key((name), (singlethread), (freezeable), NULL, NULL) |
165 | #endif | 173 | #endif |
166 | 174 | ||
167 | #define create_workqueue(name) __create_workqueue((name), 0, 0) | 175 | #define create_workqueue(name) __create_workqueue((name), 0, 0) |