Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2662416pxb; Tue, 9 Mar 2021 07:59:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJzc781WraW12UBnrZHEmv/MjAfHixrcm9m0nSLPTazvwTc56Qwntrj4bzpULvSJq7LjcMap X-Received: by 2002:a17:907:f97:: with SMTP id kb23mr20831339ejc.33.1615305551993; Tue, 09 Mar 2021 07:59:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615305551; cv=none; d=google.com; s=arc-20160816; b=vM0L80j26MSPH+N/YbV0ZTXEITaknXTeaRNii21ThkZl6cyTSM99Dy+N+jSZjGoK0J IoVEs1EmZMW7KRLZ5LAj7AWAYmuY/aB/oWRx14wksklX1KE17If0tOOHmyKCxVm2nF/o SkYLa5dexfNRABB/6woySVgbpF68XujBo9SiwDl/3eVWjqt04WsR/ZX8WEEnIUPXg9yQ nUE+IW1Q1yduqgeohcq2mFxZVo8pqagF2P+CwTW2RFceImadz4JitVpSQROFgB7fB3xs Z6ib9kI9FI3knnvSacdRcKwX8sb2Sv/Z6VwV5zpIARxJ7zTw/39czKQGAerlPN4gZ0mz NaeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IFk47HqYrcljU8sgV3Szm3kSO/BjefEBgYu1y49MYsE=; b=gtTPVjmCm8yL62lHhqNVSFOEfstSDrwWkuzWfo89s+3Cv7LQj5YAcaOcgvcyM5JXgr O8KljnejdB16mmBeCqRNK5V3+Cvk8FzNgoD7Iv7WY2Z1wABe7bkutRidHTDG8ZDG8euZ WTMvEeHFT6MRCS7reM1zv5eqLQBdkmJHFChIMCbVF0AZXqXpYUrPCiuqZTvqSMPfb0XG NVSedzDerZjPMmmX2qorw6o25LtW4+LlzvhnmITbW5ViyKrC1mvkEcj628ueQ+cGUKd4 H0Lr20XeCd+AjEBmciHOaEXKgKYZNTFqU6SfBdjRGZCaYiR+1GO0d1DhyA9lhHIcA0XM 8ECQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=WHyxP41M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cc4si9256049edb.347.2021.03.09.07.58.48; Tue, 09 Mar 2021 07:59:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=WHyxP41M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232065AbhCIP53 (ORCPT + 99 others); Tue, 9 Mar 2021 10:57:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232045AbhCIP44 (ORCPT ); Tue, 9 Mar 2021 10:56:56 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEF2AC061762; Tue, 9 Mar 2021 07:56:55 -0800 (PST) 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=IFk47HqYrcljU8sgV3Szm3kSO/BjefEBgYu1y49MYsE=; b=WHyxP41MA1s5vmF0W/htokhaBx JJRExXLLcZF4nmAarls1d3HuzNwpxmbC2mhuQ2AjlEBa/HE9uab75LwxnBHvSlkMbCIWybzSODn2N nI1H1JvK6Iir6AOGJrydVaRgu6VKcvBTzTMpXy9rIa7WbTAufbU1gTxOWVjZCYgJMpuoZTM/mo4PI uRhHJt00wwUBMfOwTrEx++Btjp1eJXNPixwQbRg7gtFznHkapP3JdMEA9Bcm9iGgeFNorbolw8FTk j7Z0M3Q+So7C7evvGwEeGHmpDkMRkIYZTYMWqzUeucdgD9LBE/o0m4JdRWf9Xk52M7m+GAD4SKJAt L4oOHUZw==; Received: from [2001:4bb8:180:9884:c70:4a89:bc61:3] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lJehy-000lWp-8R; Tue, 09 Mar 2021 15:55:48 +0000 From: Christoph Hellwig To: Al Viro Cc: Andrew Morton , Daniel Vetter , Nadav Amit , "VMware, Inc." , "Michael S. Tsirkin" , David Hildenbrand , Minchan Kim , Nitin Gupta , Jason Gunthorpe , Alex Williamson , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 8/9] z3fold: remove the z3fold file system Date: Tue, 9 Mar 2021 16:53:47 +0100 Message-Id: <20210309155348.974875-9-hch@lst.de> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210309155348.974875-1-hch@lst.de> References: <20210309155348.974875-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just use the generic anon_inode file system. Signed-off-by: Christoph Hellwig --- mm/z3fold.c | 38 ++------------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/mm/z3fold.c b/mm/z3fold.c index e7cd9298b221f5..e0749a3d8987de 100644 --- a/mm/z3fold.c +++ b/mm/z3fold.c @@ -23,6 +23,7 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +#include #include #include #include @@ -345,38 +346,10 @@ static inline void free_handle(unsigned long handle, struct z3fold_header *zhdr) } } -static int z3fold_init_fs_context(struct fs_context *fc) -{ - return init_pseudo(fc, Z3FOLD_MAGIC) ? 0 : -ENOMEM; -} - -static struct file_system_type z3fold_fs = { - .name = "z3fold", - .init_fs_context = z3fold_init_fs_context, - .kill_sb = kill_anon_super, -}; - -static struct vfsmount *z3fold_mnt; -static int z3fold_mount(void) -{ - int ret = 0; - - z3fold_mnt = kern_mount(&z3fold_fs); - if (IS_ERR(z3fold_mnt)) - ret = PTR_ERR(z3fold_mnt); - - return ret; -} - -static void z3fold_unmount(void) -{ - kern_unmount(z3fold_mnt); -} - static const struct address_space_operations z3fold_aops; static int z3fold_register_migration(struct z3fold_pool *pool) { - pool->inode = alloc_anon_inode_sb(z3fold_mnt->mnt_sb); + pool->inode = alloc_anon_inode(); if (IS_ERR(pool->inode)) { pool->inode = NULL; return 1; @@ -1787,22 +1760,15 @@ MODULE_ALIAS("zpool-z3fold"); static int __init init_z3fold(void) { - int ret; - /* Make sure the z3fold header is not larger than the page size */ BUILD_BUG_ON(ZHDR_SIZE_ALIGNED > PAGE_SIZE); - ret = z3fold_mount(); - if (ret) - return ret; zpool_register_driver(&z3fold_zpool_driver); - return 0; } static void __exit exit_z3fold(void) { - z3fold_unmount(); zpool_unregister_driver(&z3fold_zpool_driver); } -- 2.30.1