From nobody Fri Dec 19 04:53:06 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 278AC35948 for ; Thu, 19 Dec 2024 18:38:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734633495; cv=none; b=a5OtBTrDnMiZmk95o9RWsNH44M+Dk/9+19saKfHn9stsqVwFaCZwh/oe7vWVqW+5TPpFb6Wn8c4WrNGweX8KTy0Ee8HLXZW0rZPEtHYJeNdXDFSThox+rBcA9Hc0ZKU8QqnS00KCvH+9/7exzpeDy1oHj9UwcZuB+xAiFIRHJBM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734633495; c=relaxed/simple; bh=AinezoE30M/6qvvfLweOvIkk+vvNTOtlQBV9j6TFnG0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=eZdUkR+d0Cv5XN7n39scRYPbkQZBgm8NhuJ+dIHICKWlrilllMe9WjP6dOCrCwONK59VMRdwsc/gwCUn/Z2QvEuhtkb92O3oi1OwNl6J6IJAye5lTJUCt4HLqmiL0rvXgJOc1/yl7EuoA/Bs0yW4OO7XTOLkrrbrhKjek7jHbPY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=blZtwZn4; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="blZtwZn4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C541C4CED0; Thu, 19 Dec 2024 18:38:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734633493; bh=AinezoE30M/6qvvfLweOvIkk+vvNTOtlQBV9j6TFnG0=; h=From:To:Cc:Subject:Date:From; b=blZtwZn4IwZf6P9w1o5xqcbGYsyk9Kmh3vwbKmewNPsZVadDvt2mLBle7nT+aoVsC dD3nlNAp8YnFFbSsZn4fBKWh1s/w22bwkg5E0hnl6/lnB61doBiK9Ej7WNvBOBhUQs EEgsggZ1zoMJG6Ov4rQi5+WcFITaR3tdRZ6iGSE+0whF56U8IOZ5VvVAYjSSxEIjX0 mkJpNhx0eASBo8UMyAIi2G54poPZe2TZvcp0DCQ/Y5JcpGJOQKKgsm8epq/ve8I6Hx b4O6bSKkR0pf+V1jmV/FdOYYyWNSwa6aNgoFEwqRiR+EvOl/1au0ZorBvZKxdQ9aSm 9Pzm/yglEnBJQ== From: SeongJae Park To: yangge , Andrew Morton Cc: SeongJae Park , Muchun Song , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH mm-unstable] mm/hugetlb: define replace_free_hugepage_folios() on CONFIG_HUGETLB_PAGE=n as static inline Date: Thu, 19 Dec 2024 10:37:53 -0800 Message-Id: <20241219183753.62922-1-sj@kernel.org> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Commit fba5261e0039 ("mm: replace free hugepage folios after migration") on mm-unstable that also available at https://lkml.kernel.org/r/1734503588-16254-1-git-send-email-yangge1116@126.= com breaks build when CONFIG_HUGETLB_PAGE=3Dn as below, since replace_free_hugepage_folios() is defined on the header as non-inline. Fix it. ./tools/testing/kunit/kunit.py run --kunitconfig mm/damon/tests --build= _dir ../kunit.out [...] ld: io_uring/rsrc.o: in function `replace_free_hugepage_folios': rsrc.c:(.text+0x160): multiple definition of `replace_free_hugepage_fol= ios'; kernel/fork.o:fork.c:(.text+0xc30): first defined here [...] make: *** [Makefile:251: __sub-make] Error 2 Fixes: fba5261e0039 ("mm: replace free hugepage folios after migration") Signed-off-by: SeongJae Park --- include/linux/hugetlb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 7d36ac8df97f..10faf42ca96a 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -1060,7 +1060,8 @@ static inline int isolate_or_dissolve_huge_page(struc= t page *page, return -ENOMEM; } =20 -int replace_free_hugepage_folios(unsigned long start_pfn, unsigned long en= d_pfn) +static inline int replace_free_hugepage_folios(unsigned long start_pfn, + unsigned long end_pfn) { return 0; } --=20 2.39.5