aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLi Zhong <zhong@linux.vnet.ibm.com>2014-02-13 21:52:57 -0500
committerTejun Heo <tj@kernel.org>2014-02-14 09:05:39 -0500
commitfada94ee64e6e18793b1db60fb8278d2eddbf922 (patch)
tree112c14c7251d8068576a5941b4d0c37793d4c142 /include
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
workqueue: add args to workqueue lockdep name
Tommi noticed a 'funny' lock class name: "%s#5" from a lock acquired in process_one_work(). Maybe #fmt plus #args could be used as the lock_name to give some more information for some fmt string like the above. __builtin_constant_p() check is removed (as there seems no good way to check all the variables in args list). However, by removing the check, it only adds two additional "s for those constants. Some lockdep name examples printed out after the change: lockdep name wq->name "events_long" events_long "%s"("khelper") khelper "xfs-data/%s"mp->m_fsname xfs-data/dm-3 Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/workqueue.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 594521ba0d43..704f4f652d0a 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -419,10 +419,7 @@ __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active,
419 static struct lock_class_key __key; \ 419 static struct lock_class_key __key; \
420 const char *__lock_name; \ 420 const char *__lock_name; \
421 \ 421 \
422 if (__builtin_constant_p(fmt)) \ 422 __lock_name = #fmt#args; \
423 __lock_name = (fmt); \
424 else \
425 __lock_name = #fmt; \
426 \ 423 \
427 __alloc_workqueue_key((fmt), (flags), (max_active), \ 424 __alloc_workqueue_key((fmt), (flags), (max_active), \
428 &__key, __lock_name, ##args); \ 425 &__key, __lock_name, ##args); \