From patchwork Mon Apr 8 19:42:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13621549 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FF43CD1296 for ; Mon, 8 Apr 2024 19:42:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4E39D6B0092; Mon, 8 Apr 2024 15:42:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 494266B0093; Mon, 8 Apr 2024 15:42:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 334BD6B0095; Mon, 8 Apr 2024 15:42:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 0EA156B0092 for ; Mon, 8 Apr 2024 15:42:51 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id C204F16015B for ; Mon, 8 Apr 2024 19:42:50 +0000 (UTC) X-FDA: 81987387300.09.0315A51 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf17.hostedemail.com (Postfix) with ESMTP id 5B52040010 for ; Mon, 8 Apr 2024 19:42:49 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=vXZoHYL3; dmarc=none; spf=none (imf17.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1712605369; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=r5awW3J/nYbjEFveiyyIQmrVEsasFG1Qhu6fbcLeBPU=; b=0y1JHvKuTO502ICdhcntOsdCblcu6NZxCdyLHPQRH4G+zJ66Y25EWxK+Ikyc/g0IxscjGw uNvjLGmtOg35FbRtFiSLIw0y/DzJIN+wBK0goxy+9W+s60vc380fla6QGJWwHcctt8i/3s 2vtt5Wo25xaJ0PzBMz4BWNi6QLKstfM= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=vXZoHYL3; dmarc=none; spf=none (imf17.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1712605369; a=rsa-sha256; cv=none; b=oxwCpHRxZHDSEk/hRRYbrx/zkNVskh3GlD/1HMQTy4M/SvXRjjbEI8uQsPhO7KU+CQmcv3 0DFxxqdccoLg3ER7VcGNNctNsfCOPETESRBXyC5CGUFCRi6hPm5FMg7YU+slD8KJiMKbAM zCiHHcy2SHzneu88mTgFnmQj4zfiM60= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=r5awW3J/nYbjEFveiyyIQmrVEsasFG1Qhu6fbcLeBPU=; b=vXZoHYL3wEYU5WmFjHMyLNmYN+ yqsWg23pxsx71mtiwK2vXPiF3g8CPdPLq6xn+iq6Rcc0DoeOjjJ+0lpeXe5QjBIjAmNU5V2KO5JOQ 5RnLIB2NrCMVTuO3H2kc9ckpACaVNh7EnuVyi/qS9w0U+BZsV46EmYLBqb64jUBjyDcAWPGFFykWW PF9jG5cTAoUJ5rLVtY4Eh8RUeVtdrsYXvkDqFjwI2CK3qVCwpoVSMmnU6+WGxXaCULrxzNjhcyXgZ Gl/7H2a3WyFQydg5VdY9JqBtz6xDCRSkAKDwwuOLuCAIt/qe7+E9awFegdSIB4WSFlrjF/kPraNrq yFaM4W9Q==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rtut0-00000000UqF-44MV; Mon, 08 Apr 2024 19:42:34 +0000 From: "Matthew Wilcox (Oracle)" To: Miaohe Lin Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH v2 04/11] mm: Make page_mapped_in_vma conditional on CONFIG_MEMORY_FAILURE Date: Mon, 8 Apr 2024 20:42:22 +0100 Message-ID: <20240408194232.118537-5-willy@infradead.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240408194232.118537-1-willy@infradead.org> References: <20240408194232.118537-1-willy@infradead.org> MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: whko7rs5wg6m6ajpisgorcs4ehdqb7uz X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 5B52040010 X-HE-Tag: 1712605369-55511 X-HE-Meta: U2FsdGVkX1/c1Z05AgSVtJ0isQ1mI/oJXAiWG0bpYNlaBUMwFGwMJ9GXpPeDbiPN3OboJZ64B6iQYHkj8PlwPk2AwP+u5yFT+/9lQmG5K2Y2RCtukU6xQMDdCOyFS3Bs/ocekt8LQGIQB7oY4LlOryyMCvneCs5c+EYm1zhgRKjJYB2KnFkseJd1ZYctvIEVSJCW5Ymefp4gUWTvGTxPV1A+mUx9aYqU/1L/V8OVJaTcfR8mhP351N4kJdzqH6NnAUavgtjfApu4HW4FI1Uwd9Arb1t6SnYTsAH4QcXHybDxaVZj3EbD/jsHjEJRAkNJG+dA4SCi7RV6hfl9LOzQbF37EPXf2zTFpWb0vahzIDriIYu4/9PEdLKxnNCFDePwcOQecfVBX0sAoJYqO/lX0i8TebJyBTkMxxUTDPAnw2Mh/GybHd5jo8AyUf1AS3Z2cGux5rc8in0xtUI1cvEZucXBMEfG18jZi2l3hY63FnVgf9ZY5dvM1VdeyWAez6eNvS33xy91zqjCzmfL1QCWuz9OyZkp26gfcbXVzCOpFoO8e7QzMNwQHOUbz6hXBKNVfI+dJkFcgZ7WTx9prxeaHMxrBhXbFayyUEw9JCTN8FmKXLC4m74YXRGOkRw9zIAdWqwDA6EMH7SH3iO7GTu6f59z5bAUJfQXGhQ7og2v7ueWri2hgRxHqW1mbmv+qjUAjLgeu7wab3rtgcESlSDl6PqIILVDYonKJuKYwnXRbb/mDHjpjHtzTEhHSVO53oTN/ZOWKykGw3gILwUCRQr8xp2IGhzzxHqj9sm0tHMBveEuVX36r7y3xXsCKgGn3Ba7t8XP808oWP5t7XJJzD8GHxdG57hIHYsIvMhyiFmKocGxt/eM/PEakV3OvJCLIHldqWB41xDhM0xUvDF064OWfwbN/Q1Jwa4J X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: This function is only currently used by the memory-failure code, so we can omit it if we're not compiling in the memory-failure code. Suggested-by: Miaohe Lin Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jane Chu Reviewed-by: Oscar Salvador --- mm/page_vma_mapped.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/page_vma_mapped.c b/mm/page_vma_mapped.c index 48bfc17934cd..6e06267fc220 100644 --- a/mm/page_vma_mapped.c +++ b/mm/page_vma_mapped.c @@ -314,6 +314,7 @@ bool page_vma_mapped_walk(struct page_vma_mapped_walk *pvmw) return false; } +#ifdef CONFIG_MEMORY_FAILURE /** * page_mapped_in_vma - check whether a page is really mapped in a VMA * @page: the page to test @@ -344,3 +345,4 @@ int page_mapped_in_vma(struct page *page, struct vm_area_struct *vma) out: return pvmw.address; } +#endif