mm/madvise: split out madvise() behavior execution
authorSeongJae Park <sj@kernel.org>
Thu, 6 Feb 2025 06:15:16 +0000 (22:15 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 17 Mar 2025 05:06:04 +0000 (22:06 -0700)
commit457753da6462024ad821bcb4df2d828cf2ef18be
treea77820b86d7259ae443657d6ecfec58d7cf61aa5
parentdbb0020bbc2c9f563d68564b36d6e8d32f82008b
mm/madvise: split out madvise() behavior execution

Split out the madvise behavior applying logic from do_madvise() to make
it easier to reuse from the following change.

Link: https://lkml.kernel.org/r/20250206061517.2958-4-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Reviewed-by: Shakeel Butt <shakeel.butt@linux.dev>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Liam R. Howlett <howlett@gmail.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/madvise.c