We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1597339 commit 60c223eCopy full SHA for 60c223e
include/linux/hugetlb.h
@@ -713,6 +713,7 @@ HPAGEFLAG(RawHwpUnreliable, raw_hwp_unreliable)
713
/* Defines one hugetlb page size */
714
struct hstate {
715
struct mutex resize_lock;
716
+ struct lock_class_key resize_key;
717
int next_nid_to_alloc;
718
int next_nid_to_free;
719
unsigned int order;
mm/hugetlb.c
@@ -4334,7 +4334,7 @@ void __init hugetlb_add_hstate(unsigned int order)
4334
BUG_ON(hugetlb_max_hstate >= HUGE_MAX_HSTATE);
4335
BUG_ON(order == 0);
4336
h = &hstates[hugetlb_max_hstate++];
4337
- mutex_init(&h->resize_lock);
+ __mutex_init(&h->resize_lock, "resize mutex", &h->resize_key);
4338
h->order = order;
4339
h->mask = ~(huge_page_size(h) - 1);
4340
for (i = 0; i < MAX_NUMNODES; ++i)
0 commit comments