aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmalloc.c
diff options
context:
space:
mode:
authorLuis Chamberlain <[email protected]>2023-03-09 23:05:43 +0000
committerAndrew Morton <[email protected]>2023-03-28 23:20:15 +0000
commit9a976f0c847b67d22ed694556a3626ed92da0422 (patch)
tree20371c7fdc50a63e6e5228af347a8c6e42825a13 /mm/vmalloc.c
parentshmem: move reclaim check early on writepages() (diff)
downloadkernel-9a976f0c847b67d22ed694556a3626ed92da0422.tar.gz
kernel-9a976f0c847b67d22ed694556a3626ed92da0422.zip
shmem: skip page split if we're not reclaiming
In theory when info->flags & VM_LOCKED we should not be getting shem_writepage() called so we should be verifying this with a WARN_ON_ONCE(). Since we should not be swapping then best to ensure we also don't do the folio split earlier too. So just move the check early to avoid folio splits in case its a dubious call. We also have a similar early bail when !total_swap_pages so just move that earlier to avoid the possible folio split in the same situation. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Luis Chamberlain <[email protected]> Acked-by: David Hildenbrand <[email protected]> Reviewed-by: Christian Brauner <[email protected]> Reviewed-by: Yosry Ahmed <[email protected]> Tested-by: Xin Hao <[email protected]> Reviewed-by: Davidlohr Bueso <[email protected]> Cc: Adam Manzanares <[email protected]> Cc: Davidlohr Bueso <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Kees Cook <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Pankaj Raghav <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/vmalloc.c')
0 files changed, 0 insertions, 0 deletions