From patchwork Fri Jan 26 13:28:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13532569 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 C8878C47DDF for ; Fri, 26 Jan 2024 13:29:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5D4B76B0082; Fri, 26 Jan 2024 08:29:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 586526B0087; Fri, 26 Jan 2024 08:29:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 428186B0088; Fri, 26 Jan 2024 08:29:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 3529E6B0082 for ; Fri, 26 Jan 2024 08:29:32 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 12DAB1A052C for ; Fri, 26 Jan 2024 13:29:32 +0000 (UTC) X-FDA: 81721544184.30.EF27C6C Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf21.hostedemail.com (Postfix) with ESMTP id 667CB1C0016 for ; Fri, 26 Jan 2024 13:29:30 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=UeYennuX; spf=none (imf21.hostedemail.com: domain of BATV+8230b42af99c397292d7+7460+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+8230b42af99c397292d7+7460+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706275770; 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=0iKTKDcwlGTInQAMwUK2KO8AY6uPQ9BP+hArH0/aSbQ=; b=tr+/HH0pDXWaZnkztXQkL1G1pgTuzFl9eLvFv0Ee4ksTZ9OoJFBNYoCDXIrq2Cb/SVR2Ko bkeLZxUd6w5mYErSL2Jc7mcpO/V6ViyC2c/lWyNihuWlsFY8Gd14IUJB9Fnw8cHcUnTvpU J6ZqsML2wynBI/In+718if4MgasXSzo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706275770; a=rsa-sha256; cv=none; b=Bc6c7vePhb2fgWTpOcArWBlbRrgpSJLURd1Al17Zde+asKus0s2PVJ02m70hFFaW6s6s9g xX5BuhcIzHjMrg9R4/UQ8ClX0h92n17cAhFVVf2kNM/sZfsYZW3Yk0rv1V41GtwxTmiEaK /N2ny9AzOHz8kAET86Td2VsVDa1y5f0= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=UeYennuX; spf=none (imf21.hostedemail.com: domain of BATV+8230b42af99c397292d7+7460+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+8230b42af99c397292d7+7460+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=0iKTKDcwlGTInQAMwUK2KO8AY6uPQ9BP+hArH0/aSbQ=; b=UeYennuXziCc+zdB372FuC0/HR hb6hwObADJ+u0qirrQQSkwydcainIxZiErI9BUMvAeuIgioUBjkXfn0dz0Gx6FjLryifXOqo0JZai Kq9uCtM8f4VKyQaLNpLcZmlNzbMkerdRpZVjQvFLw5gH9dLYYUFCmKP0/hdOzi5rwuk958xNLk3Jk zheSxk0hFT/FcGN+8kdqe8fKZYovpF30hiwAj1n31kuDgmh0jCcpHc/vos3vyvjpxO3bnKqYREcwz bHZet5+xHphrBFrHS+eE2iUHyRnTyFmOT9Hk9D44NQnmNOFzM1uVw+gtYUwXp3UweuimJByQTHHuV XS26AYNQ==; Received: from 2a02-8389-2341-5b80-39d3-4735-9a3c-88d8.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:39d3:4735:9a3c:88d8] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTMGu-00000004CfW-0d0W; Fri, 26 Jan 2024 13:29:28 +0000 From: Christoph Hellwig To: Chandan Babu R , "Darrick J. Wong" , Hugh Dickins , Andrew Morton Cc: linux-xfs@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 06/21] shmem: export shmem_kernel_file_setup Date: Fri, 26 Jan 2024 14:28:48 +0100 Message-Id: <20240126132903.2700077-7-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240126132903.2700077-1-hch@lst.de> References: <20240126132903.2700077-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Stat-Signature: x6m5ce9rogrs56s3arg4fnreujw6jbgr X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 667CB1C0016 X-Rspam-User: X-HE-Tag: 1706275770-842514 X-HE-Meta: U2FsdGVkX18tzodn/U1INg/sEwJgChaeDr4xtzgioxyuxuCddxc1JLQJH2izkOWzN39LrqN8UsKK3KPPy4ud+Z+MolGNx9CPcLRJ8Jes0mNz8norJ8g+L5LDp15ornmahG77RoCSRWJuabu2/D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j/6jSalAb5XGgeBx99jisXTT1e18UyJ7a211OgWSVSolXZaG8p4rAYWQmdIcqrpjRYPGAV1uqIJdJAzPll/1Pdv+Zj8j5c6hqA7NhvBnMaccsb/0fDdEF24B9IoiEoxo0ptAkOFgGVFw1XsnKHOUbxEAY8mjH5fyWCpQ1bG/k2DJY/th1XB/LOC3ryg3tDjuAIQYUztUcjWf0CeK3Xdmx2PM7iz/S2TKx2No8UwLs9b72uZ+VLCbG8= 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: XFS wants to use this for it's internal in-memory data structures and currently duplicates the functionality. Export shmem_kernel_file_setup to allow XFS to switch over to using the proper kernel API. Signed-off-by: Christoph Hellwig Reviewed-by: Matthew Wilcox (Oracle) --- mm/shmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/shmem.c b/mm/shmem.c index dae684cd3c99fb..e89fb5eccb0c0a 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -4856,6 +4856,7 @@ struct file *shmem_kernel_file_setup(const char *name, loff_t size, unsigned lon { return __shmem_file_setup(shm_mnt, name, size, flags, S_PRIVATE); } +EXPORT_SYMBOL_GPL(shmem_kernel_file_setup); /** * shmem_file_setup - get an unlinked file living in tmpfs