We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1791329 commit 39ee1c7Copy full SHA for 39ee1c7
include/linux/hugetlb.h
@@ -694,6 +694,7 @@ HPAGEFLAG(RawHwpUnreliable, raw_hwp_unreliable)
694
/* Defines one hugetlb page size */
695
struct hstate {
696
struct mutex resize_lock;
697
+ struct lock_class_key resize_key;
698
int next_nid_to_alloc;
699
int next_nid_to_free;
700
unsigned int order;
mm/hugetlb.c
@@ -4353,7 +4353,7 @@ void __init hugetlb_add_hstate(unsigned int order)
4353
BUG_ON(hugetlb_max_hstate >= HUGE_MAX_HSTATE);
4354
BUG_ON(order == 0);
4355
h = &hstates[hugetlb_max_hstate++];
4356
- mutex_init(&h->resize_lock);
+ __mutex_init(&h->resize_lock, "resize mutex", &h->resize_key);
4357
h->order = order;
4358
h->mask = ~(huge_page_size(h) - 1);
4359
for (i = 0; i < MAX_NUMNODES; ++i)
0 commit comments