]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm/migrate_device: document folio_get requirement before frozen PMD split
authorUsama Arif <usama.arif@linux.dev>
Mon, 9 Mar 2026 21:25:02 +0000 (14:25 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 5 Apr 2026 20:53:19 +0000 (13:53 -0700)
commit5a14198ec63c130b7377911d3cf99c93547d5fb8
tree09259bb4d98345d27d004f96a658dc5054d78313
parentd7651089939bf00fe033845e662905ce750b1f18
mm/migrate_device: document folio_get requirement before frozen PMD split

split_huge_pmd_address() with freeze=true splits a PMD migration entry
into PTE migration entries, consuming one folio reference in the process.
The folio_get() before it provides this reference.

Add a comment explaining this relationship.  The expected folio refcount
at the start of migrate_vma_split_unmapped_folio() is 1.

Link: https://lkml.kernel.org/r/20260309212502.3922825-1-usama.arif@linux.dev
Signed-off-by: Usama Arif <usama.arif@linux.dev>
Suggested-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Nico Pache <npache@redhat.com>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Byungchul Park <byungchul@sk.com>
Cc: Gregory Price <gourry@gourry.net>
Cc: "Huang, Ying" <ying.huang@linux.alibaba.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Joshua Hahn <joshua.hahnjy@gmail.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Rakie Kim <rakie.kim@sk.com>
Cc: Ying Huang <ying.huang@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/migrate_device.c