mm/cma: don't treat bad input arguments for cma_alloc() as its failure
authorAnshuman Khandual <anshuman.khandual@arm.com>
Thu, 1 Feb 2024 02:37:14 +0000 (08:07 +0530)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 22 Feb 2024 18:24:47 +0000 (10:24 -0800)
commitd818c98a52cce29da4f35b73e640bf293036fa03
treec4da2b39f554f58e55c8684cf3b58687f3845360
parent565474afe08ad28de0d655c5ed36aab3702cb93d
mm/cma: don't treat bad input arguments for cma_alloc() as its failure

Invalid cma_alloc() input scenarios - including excess allocation request
should neither be counted as CMA_ALLOC_FAIL nor 'cma->nr_pages_failed' be
updated when applicable with CONFIG_CMA_SYSFS. This also drops 'out' jump
label which has become redundant.

Link: https://lkml.kernel.org/r/20240201023714.3871061-1-anshuman.khandual@arm.com
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Kalesh Singh <kaleshsingh@google.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/cma.c