summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hildenbrand (Red Hat) <david@kernel.org>2026-01-20 02:01:12 +0300
committerAndrew Morton <akpm@linux-foundation.org>2026-02-01 01:22:31 +0300
commit6af05dfe9af7df4756494e460289fc9a9d2fc531 (patch)
tree61e7dd66458530c9969cf7517745ced211233831
parent5b3342cbf0f4493fa955675df79f9d10ab778662 (diff)
downloadlinux-6af05dfe9af7df4756494e460289fc9a9d2fc531.tar.xz
mm/balloon_compaction: improve comments for WARN_ON_ONCE(!b_dev_info)
Let's clarify a bit by extending the comments. Link: https://lkml.kernel.org/r/20260119230133.3551867-5-david@kernel.org Signed-off-by: David Hildenbrand (Red Hat) <david@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: Eugenio Pérez <eperezma@redhat.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jason Wang <jasowang@redhat.com> Cc: Jerrin Shaji George <jerrin.shaji-george@broadcom.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Liam Howlett <liam.howlett@oracle.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Mike Rapoport <rppt@kernel.org> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: SeongJae Park <sj@kernel.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Cc: Zi Yan <ziy@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/balloon_compaction.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c
index 03c5dbabb156..85eea88cea08 100644
--- a/mm/balloon_compaction.c
+++ b/mm/balloon_compaction.c
@@ -222,7 +222,11 @@ static void balloon_page_putback(struct page *page)
struct balloon_dev_info *b_dev_info = balloon_page_device(page);
unsigned long flags;
- /* Isolated balloon pages cannot get deflated. */
+ /*
+ * When we isolated the page, the page was still inflated in a balloon
+ * device. As isolated balloon pages cannot get deflated, we still have
+ * a balloon device here.
+ */
if (WARN_ON_ONCE(!b_dev_info))
return;
@@ -241,7 +245,11 @@ static int balloon_page_migrate(struct page *newpage, struct page *page,
VM_BUG_ON_PAGE(!PageLocked(page), page);
VM_BUG_ON_PAGE(!PageLocked(newpage), newpage);
- /* Isolated balloon pages cannot get deflated. */
+ /*
+ * When we isolated the page, the page was still inflated in a balloon
+ * device. As isolated balloon pages cannot get deflated, we still have
+ * a balloon device here.
+ */
if (WARN_ON_ONCE(!balloon))
return -EAGAIN;