We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00c0e48 commit 5ca2a45Copy full SHA for 5ca2a45
include/linux/hugetlb.h
@@ -600,6 +600,7 @@ HPAGEFLAG(VmemmapOptimized, vmemmap_optimized)
600
/* Defines one hugetlb page size */
601
struct hstate {
602
struct mutex resize_lock;
603
+ struct lock_class_key resize_key;
604
int next_nid_to_alloc;
605
int next_nid_to_free;
606
unsigned int order;
mm/hugetlb.c
@@ -3717,7 +3717,7 @@ void __init hugetlb_add_hstate(unsigned int order)
3717
BUG_ON(hugetlb_max_hstate >= HUGE_MAX_HSTATE);
3718
BUG_ON(order == 0);
3719
h = &hstates[hugetlb_max_hstate++];
3720
- mutex_init(&h->resize_lock);
+ __mutex_init(&h->resize_lock, "resize mutex", &h->resize_key);
3721
h->order = order;
3722
h->mask = ~(huge_page_size(h) - 1);
3723
for (i = 0; i < MAX_NUMNODES; ++i)
0 commit comments