From patchwork Wed Apr 24 19:19:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13642428 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 68C52C4345F for ; Wed, 24 Apr 2024 19:19:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BDAAA6B02DD; Wed, 24 Apr 2024 15:19:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B3BBF6B02DE; Wed, 24 Apr 2024 15:19:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9DC1A6B02DF; Wed, 24 Apr 2024 15:19:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 7EE816B02DD for ; Wed, 24 Apr 2024 15:19:22 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 2E731160616 for ; Wed, 24 Apr 2024 19:19:22 +0000 (UTC) X-FDA: 82045388964.28.D844A48 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf06.hostedemail.com (Postfix) with ESMTP id 9921518001F for ; Wed, 24 Apr 2024 19:19:20 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=kAYqqqdJ; spf=none (imf06.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1713986360; 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=nB8kSxT/uDkbRjB1TqsueuuPTaw1paGjikHn3nogoCY=; b=FqiceIpolQUp2HmDvYRsxVGA9gzhnWkwKRWJpJJ7tg287+J6hdjxXtk6FCvP9LN2pDW4lR TOZ7Hg6zqrvbNnwyRuFo+7HTRSkIJDfff2rYasH9iywvK/lSE1neXs8NQWAG7HIFYcW2XX 2CqyhfOaPdYpGkIWRfSCJvXmdkZ5VXs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713986360; a=rsa-sha256; cv=none; b=I9fF+gr5PCXRtaXzIH75D3J1Dp63ZRdKn9Jq1qhn3YEqG6gZGi1WH9UICLC0iwYdU+kdM+ 0ocN9FIM3iX/qlIf3njH3nWfdUr5sZKsnyQbwUhKbr7qA/b2Gkqgl0dbCV85UDC+eZSG5m ANDcudCO0Joz33/4tOXnmxryajV2MZ8= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=kAYqqqdJ; spf=none (imf06.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none 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=nB8kSxT/uDkbRjB1TqsueuuPTaw1paGjikHn3nogoCY=; b=kAYqqqdJUWVeRY6OPxvty2oW80 bGpBRV5ujlbD9R17Z9z6fHhiDuxcesBY+aNCR7Rf0R9oeJefvcYCGvyecpYzskZE5N+qR2ZFLwFyt NyCOP6N/DnGI5Av9t9SfUfYa+JtJ2Q14AsERiA8FxqCBq9QWwM4p6Gt/wqSUSYwQZh+Ra9mQCAsAE m6wyhs9DKO+eWt2RhlCnYCi4vndPB4NiOs0BNQqS5UpZnXjEzDeBUjyIWr3qbqoS66hSEQrnGKqAo O+xueNgQW0gL/OM1yGEU3AguIw8TgvOu4o931Vv6YtXO5fFN1NFWa08RruoCfqpCR7011Qm1P4I3R Kwve8UHg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzi9E-00000001W3p-0Jfx; Wed, 24 Apr 2024 19:19:16 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH 2/7] mm: Remove put_devmap_managed_page() Date: Wed, 24 Apr 2024 20:19:07 +0100 Message-ID: <20240424191914.361554-3-willy@infradead.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424191914.361554-1-willy@infradead.org> References: <20240424191914.361554-1-willy@infradead.org> MIME-Version: 1.0 X-Stat-Signature: nwqtwhtyhkuunas8w13iy5ppihkfscbq X-Rspamd-Queue-Id: 9921518001F X-Rspamd-Server: rspam06 X-Rspam-User: X-HE-Tag: 1713986360-375753 X-HE-Meta: U2FsdGVkX18u5Dj6xi7RAjbtv/ELV140rwJQGN1tSJ9bPKroW+9CG36I/toO4RtFwj9El3+JL8JZdrUIZVA5/UhyyXEp4DO6ozBt25yBH8F0rUJuq27dTNFR2P35lerCGBu6jNQ3ErrJBaz0nCGW0xkqlLldgR11omZAnNz4bMr3zSfoWjMfoAnVkpEiZUpbZJ0Uzmvb42EEBQEb5BGxhP40ulibSYLywWtCNqScfpsI86Lg+F3Ok5paBsGC/JfWLlf/0+gzRZK29BEKmwMfOoSLvUZdc1KW0rS2CJLfY48eJkoGlCaqoKDxzWuK/CA7MME27dROks86e2kzvicjhFFJ+ptKzib3yAMs3hETKmRjAdk/KcDmxy0bXavdC9EZd2hIpaMkGbaYNyOAxNJV1OJc7A5bbkkDUN1/Po6+songQvgS6oXF1DYrwhSe9sYYVsad8CUI5Ve7bkH0Wqvmhlf2WEuXXPdiSJbfZBz+oAPRFN58x+sCaNFvy14U+E87C8zsXun+U1RYMmTEuKzGWgZkvOR6VCN6MSSQmMGAXcliCV0SJxRvRTILtKhxU013k8BELKQJDdn0udm4BsEFyQJtaPSilUp+M4ON0kpir2HtyXBtbHdc8raDQW0hbKTPfWoK9RMzLmz44VRBpuzgmLEw/+EQdwbG0ME0a5uj/QYZZcBRxRIa+EJporsBVkBuoZnHlriFau+wNab8vfid6y/Cz3k5LB6OwWM9RS9i5i6PA1B7mz3QY/8OUKvYAtLa6GorCXQkAcvl1HHQKneMQE9sy6JoiDeJ+PEmN8cLqarmCIEFsm2dLGLZSWLoB9kriwgCLmGjm4rHCJBbq+qWOLBTI7pD9pWDLh79K6so7cwyhq5CvFFjKrp81MhXvlvvlU49rmdeAKJZsi4M1kuqUgU9uWE2+R9Sig2Dmy/1o9DktHzq8+0uKFUVaI59kW36y/RqI0QQSBJxKEBJiE6 wko4fuDo JQAPDYve7fjn91GMmPATHb/0lhJ7KSk/IR8MfP/QxgL94n3Qk9WfIzw0Iel8UZQdP2rHpmwrlO90naXxYd4Pn0dLKrQ1dtGalMp+uHFBURY2a5uw+7uqCI3PKmTu+fSdkCDMP110JLZz/a3OW0U2xaTutnsGGMMwHFZr2mMPS4+SnibquO6WhG1W1jtNIyfZAEJAGLvnhyR5Uprfj1Us24DHtDmcNez00I9jl0aUJdSJBnZs8VyEnph3BU7TJBVovn2IP23WXP8eFMj0= 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: It only has one caller; convert that caller to use put_devmap_managed_page_refs() instead. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/mm.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index e36db5e4509b..070a6e2d7222 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1453,11 +1453,6 @@ static inline bool put_devmap_managed_page_refs(struct page *page, int refs) } #endif /* CONFIG_ZONE_DEVICE && CONFIG_FS_DAX */ -static inline bool put_devmap_managed_page(struct page *page) -{ - return put_devmap_managed_page_refs(page, 1); -} - /* 127: arbitrary random number, small enough to assemble well */ #define folio_ref_zero_or_close_to_overflow(folio) \ ((unsigned int) folio_ref_count(folio) + 127u <= 127u) @@ -1576,7 +1571,7 @@ static inline void put_page(struct page *page) * For some devmap managed pages we need to catch refcount transition * from 2 to 1: */ - if (put_devmap_managed_page(&folio->page)) + if (put_devmap_managed_page_refs(&folio->page, 1)) return; folio_put(folio); }