]> Gentwo Git Trees - linux/.git/commit
mm/gup: remove record_subpages()
authorDavid Hildenbrand <david@redhat.com>
Mon, 1 Sep 2025 15:03:40 +0000 (17:03 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 21 Sep 2025 21:22:05 +0000 (14:22 -0700)
commite3c05b6e370c22451f87f2d230d131ad1bb49a60
tree0b5a4cd00d8b8c9fab8154a2174ea28df200d844
parent541541dbfeb84f0995ad1ec54a643c72081d46fc
mm/gup: remove record_subpages()

We can just cleanup the code by calculating the #refs earlier, so we can
just inline what remains of record_subpages().

Calculate the number of references/pages ahead of times, and record them
only once all our tests passed.

[david@redhat.com: fix `pages' adjustment]
Link: https://lkml.kernel.org/r/cc7f03f8-da8b-407e-a03a-e8e5a9ec5462@redhat.com
Link: https://lkml.kernel.org/r/20250901150359.867252-20-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Eric Biggers <ebiggers@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/gup.c