From patchwork Mon Feb 19 06:27:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13562208 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 A3D9FC48BC3 for ; Mon, 19 Feb 2024 06:27:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E33038D000B; Mon, 19 Feb 2024 01:27:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DC0878D0008; Mon, 19 Feb 2024 01:27:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A61908D000B; Mon, 19 Feb 2024 01:27:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 82B5C8D0008 for ; Mon, 19 Feb 2024 01:27:44 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 558871A01FE for ; Mon, 19 Feb 2024 06:27:44 +0000 (UTC) X-FDA: 81807572448.03.042C498 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf09.hostedemail.com (Postfix) with ESMTP id AABE914000A for ; Mon, 19 Feb 2024 06:27:42 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=sqglayHM; dmarc=none; spf=none (imf09.hostedemail.com: domain of BATV+994827af29a55d2021e7+7484+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+994827af29a55d2021e7+7484+infradead.org+hch@bombadil.srs.infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708324062; 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=zrbE42e/OVazoBf8Nd73psWLWVAH63CkeaWayWbz09E=; b=MX0fMv6UEj7+42/pkAmyzgPSUR91Bg76fN4qSpnTDPzuYc387R3Z/kasoXzBrwq8vrUdCL 26ahhwDLFFfZPrtu7Datd3lxVoJoT+k5X3eexh13a5i3HhixAEQBd/rQG8NrNVv3qI4KX3 HCjb9dP4sNrFEze30NGvjoY1cvKl5+Q= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=sqglayHM; dmarc=none; spf=none (imf09.hostedemail.com: domain of BATV+994827af29a55d2021e7+7484+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+994827af29a55d2021e7+7484+infradead.org+hch@bombadil.srs.infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708324062; a=rsa-sha256; cv=none; b=kVOT6mx3pP/QvIw2GadY5F1tQVX44AjNQHjQd6B5EN+oTBetm+9g8L2UZXbxj38cuBOu4E Q5G5WFBVqhwjMQEQ1b/3B/t6dLk8HK3Mi8HyT4tPj6Q+kVr7cWbQYCqlZaTiHe/KlgW+Qy zjw3/Vrcf7dEvE8M4y4GSo7RGNiHMg4= 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=zrbE42e/OVazoBf8Nd73psWLWVAH63CkeaWayWbz09E=; b=sqglayHMnjeZktr2yE3GlcoLVD kmxvXFZHAbq73iU6WBOl4bqM6ih8JGhmWEcQWxcvM/vHyUHdHHsZPaVygaLDlQtHc3TbtX3c4Cc1O LN3EJAlnNDfFZ0WmacAHKayvz9aSwkNaG8S3MtacZVSsKqt4U7Hqcf4G+yKBjUGkLWhu7MJVLv2hx l7U5aMCGsmI6puL0/jEAYGjUhFmvE3QwixSp71lBRTRPzg/QiLDrpTvFoxZ/btPKF8avE86j8zFMl WL5t52+2LcOgfNutDItqffIz5j647Ku/8IHIB9kTgkexb3WfQEfhkd/kRsvWy7hP4031NU0h3lCd0 jXEu9wow==; 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 1rbx7r-00000009F8U-2tmE; Mon, 19 Feb 2024 06:27:40 +0000 From: Christoph Hellwig To: Chandan Babu R , "Darrick J. Wong" , Hugh Dickins , Andrew Morton Cc: Hui Su , linux-xfs@vger.kernel.org, linux-mm@kvack.org, Matthew Wilcox Subject: [PATCH 06/22] shmem: export shmem_kernel_file_setup Date: Mon, 19 Feb 2024 07:27:14 +0100 Message-Id: <20240219062730.3031391-7-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240219062730.3031391-1-hch@lst.de> References: <20240219062730.3031391-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-Rspamd-Queue-Id: AABE914000A X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: jpr9ps6kttyoayjpt3ufs9nu3c338aph X-HE-Tag: 1708324062-332405 X-HE-Meta: U2FsdGVkX18jzld7IT/ZWnLC9Y3jrAPT2Ja9eQTv8tTwSumsGIDsHZnxxdn2pBkxRW0AMAtQ57fQXVZk1KHCmq82y+92aZSCy7wlUMyIuPALWnHBkKO4f/vMgVV+qL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arP4xX7cBZpTIutCVsiLUQyvm6dQsPgJ6iIr0ZyHIe7SVZseml9TPofdJn1Y90bY5O6gsCeQu3DoOASuQWr0KlXJ2SzAs19tMFF43O5uaClvBEgyIzs7awIqgDfiI18aHi6BLEHme4uz4RgsF/ASK2zK+pRgAhRJWLFiy6Bd3I/8E3LKKhDOev/7D41iVEjTlYv6HYQcz2DBPqTh9D+MPsQ4ZCI6bANwGUmKxeFisMyQLdjCPZoB8Qd6gsLKczz9QLSt67CkKtP4mxb8QpooCuu+J0wEIgsDuMPQKnMXQQaKqJnqTCW87RADIzPcsdyxQ4PIck4fX4uFfoDy9gvK3jsJ9jZIGY5nDzknVaaw= 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) Reviewed-by: Darrick J. Wong --- mm/shmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/shmem.c b/mm/shmem.c index aeb1fd19ea3f72..95e70e9ea060f3 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -4861,6 +4861,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