diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c index 30fa7ee8e1f3..f77b305b0459 100644 --- a/mm/balloon_compaction.c +++ b/mm/balloon_compaction.c @@ -28,6 +28,7 @@ static DEFINE_SPINLOCK(balloon_pages_lock); static void balloon_page_insert(struct balloon_dev_info *balloon, struct page *page) { + lockdep_assert_held(&balloon_pages_lock); __SetPageOffline(page); if (IS_ENABLED(CONFIG_BALLOON_COMPACTION)) { SetPageMovableOps(page); @@ -45,6 +46,7 @@ static void balloon_page_insert(struct balloon_dev_info *balloon, */ static void balloon_page_finalize(struct page *page) { + lockdep_assert_held(&balloon_pages_lock); if (IS_ENABLED(CONFIG_BALLOON_COMPACTION)) set_page_private(page, 0); /* PageOffline is sticky until the page is freed to the buddy. */