[LU-1730] cfs_lockdep_set_class() typo in cl_object.c Created: 09/Aug/12  Updated: 19/Apr/13  Resolved: 19/Apr/13

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.3.0
Fix Version/s: Lustre 2.4.0

Type: Bug Priority: Minor
Reporter: Ned Bass Assignee: Jinshan Xiong (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 4407

 Description   

Reading through the code I noticed a probable typo in cl_object.c.

  72 /** Lock class of cl_object_header::coh_page_guard */                           
  73 static cfs_lock_class_key_t cl_page_guard_class;                                
  74 /** Lock class of cl_object_header::coh_lock_guard */                           
  75 static cfs_lock_class_key_t cl_lock_guard_class;                                
  76 /** Lock class of cl_object_header::coh_attr_guard */                           
  77 static cfs_lock_class_key_t cl_attr_guard_class;                                
  78                                                                                 
  79 extern __u32 lu_context_tags_default;                                           
  80 extern __u32 lu_session_tags_default;                                           
  81 /**                                                                             
  82  * Initialize cl_object_header.                                                 
  83  */                                                                             
  84 int cl_object_header_init(struct cl_object_header *h)                           
  85 {                                                                               
  86         int result;                                                             
  87                                                                                 
  88         ENTRY;                                                                  
  89         result = lu_object_header_init(&h->coh_lu);                             
  90         if (result == 0) {                                                      
  91                 cfs_spin_lock_init(&h->coh_page_guard);                         
  92                 cfs_spin_lock_init(&h->coh_lock_guard);                         
  93                 cfs_spin_lock_init(&h->coh_attr_guard);                         
  94                 cfs_lockdep_set_class(&h->coh_attr_guard, &cl_page_guard_class);
  95                 cfs_lockdep_set_class(&h->coh_attr_guard, &cl_lock_guard_class);
  96                 cfs_lockdep_set_class(&h->coh_attr_guard, &cl_attr_guard_class);  

Those last three lines have the same first argument, but I think the first- and second-to-last should be &h->coh_page_guard and &h->coh_lock_guard, respecitvely.



 Comments   
Comment by Ned Bass [ 09/Aug/12 ]

http://review.whamcloud.com/#change,3590

Comment by Peter Jones [ 09/Aug/12 ]

Jinshan has been working in this area

Comment by Jodi Levi (Inactive) [ 18/Apr/13 ]

Now that Change, 3590 has landed to master, can this ticket be closed?

Comment by Ned Bass [ 18/Apr/13 ]

Yes, please close it.

Comment by Jodi Levi (Inactive) [ 19/Apr/13 ]

Landed in 2.4

Generated at Sat Feb 10 01:19:11 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.