lkml.org 
[lkml]   [2010]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 09/11] lockdep: Fix the way to initialize class_mutex for information of file and line
    Date
    This patch adds __FILE__ and __LINE__ to arguments passed for
    __mutex_init() called in __class_register().
    This affects to lockdep_map of class_mutex of struct class_private,
    and these will be used to make trace lock events more human friendly.

    Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
    ---
    drivers/base/class.c | 3 ++-
    1 files changed, 2 insertions(+), 1 deletions(-)

    diff --git a/drivers/base/class.c b/drivers/base/class.c
    index 161746d..cc0630f 100644
    --- a/drivers/base/class.c
    +++ b/drivers/base/class.c
    @@ -162,7 +162,8 @@ int __class_register(struct class *cls, struct lock_class_key *key)
    klist_init(&cp->class_devices, klist_class_dev_get, klist_class_dev_put);
    INIT_LIST_HEAD(&cp->class_interfaces);
    kset_init(&cp->class_dirs);
    - __mutex_init(&cp->class_mutex, "struct class mutex", key);
    + __mutex_init(&cp->class_mutex, "struct class mutex", key,
    + __FILE__, __LINE__);
    error = kobject_set_name(&cp->class_subsys.kobj, "%s", cls->name);
    if (error) {
    kfree(cp);
    --
    1.6.5.2


    \
     
     \ /
      Last update: 2010-01-30 12:47    [W:2.356 / U:0.248 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site