Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2687628pxb; Tue, 9 Mar 2021 08:30:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDP+g8xTySfkiggwQ7IueQ3VBK/h6xQ8S3yDqjVBHjNNSZfXypKf4vSuFRPyXzBiIBdMek X-Received: by 2002:a05:6402:149:: with SMTP id s9mr5106798edu.247.1615307425488; Tue, 09 Mar 2021 08:30:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615307425; cv=none; d=google.com; s=arc-20160816; b=c9Pc/EnD60BL4EO7Frb0blwA0FCowIG7h62V4FPYR8M/DJ28wd+CqeV14HTJQpD5IE fNqlKC45SPGlwn5AM7iEoj3dCl5cda8Ic2IaF1RIIdmlmn/B9EmaeSElB8i0AdRQy1QV S6ASC2DtQnM1KQNEHTt+hftkJfo6pPlSMM6hyvXzt/xoV45+rmVD8tCYmwxk+4nRIePD v4H/RmQ396V4R7xsVaZRi7YORyPr5TBrU8HVze8h3Oucb6VYM4pu44+Cru3emzIn+fLP /NSrgssN5fUBfSS8pQ0Z/2ClDeKacbwF5+qQdKazZJgK7MYJABSgQw8t/DDJ8TrPc5rO UbnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=QDc/X1+87E7IT2HUEvNRCZ2BjXCFrZE0D42derxTKz0=; b=YQhSn57z4OzqGbmglopw6Jl2r/CMujnIp5eLFq8iDtB2GCCO8FCsKeCeKXXQ6S8C5p by3QTvNtw1HHiFczGT8gEhIqpZT6C2IARcj15t3O2GRniQ+kthQ6vMKfSZlh6/LAZrqq 6GII2ugOfwWbAcgHcCTSr4nqKkNPD7ciTqjeux4OMRd0j7FCGRJYt8413mWovbwYzOZj Jm+xb1TpG5xfL849syxf6IfI3gnkCrLQktQo3u+CiQKtUghBphNMUY6lV1qs598x0nno cXhkqi+CDg/bP3fDQr6DarLvcWHsvy2GSHJ1MeXGtrTMPh9lxnranmSZceJZE914Oi5Z oBxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Rj7megbT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si4770793edl.510.2021.03.09.08.30.02; Tue, 09 Mar 2021 08:30:25 -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=@redhat.com header.s=mimecast20190719 header.b=Rj7megbT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231149AbhCIQ0g (ORCPT + 99 others); Tue, 9 Mar 2021 11:26:36 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:56498 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230422AbhCIQ0c (ORCPT ); Tue, 9 Mar 2021 11:26:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615307191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QDc/X1+87E7IT2HUEvNRCZ2BjXCFrZE0D42derxTKz0=; b=Rj7megbT3ZnaJVu6v6GHR7ErBpdzGK9gcEME3OT9GH38vrvkdTj/gik6bGImow//XcHgXx mz/avtYQXbVNNdI841QJp/AJtSVBL4Jfw8s4xNEAPAPPA5Mn2sAWkl/OM1Da2zRrs3ScHE sTAgY19wj3yWf6WTGLTbOAr2tMEmuTY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-321-Q3Hdf_Q4ODeKumoAfx1BcQ-1; Tue, 09 Mar 2021 11:26:24 -0500 X-MC-Unique: Q3Hdf_Q4ODeKumoAfx1BcQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 374F7108BD08; Tue, 9 Mar 2021 16:26:22 +0000 (UTC) Received: from [10.36.114.143] (ovpn-114-143.ams2.redhat.com [10.36.114.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1707A19C59; Tue, 9 Mar 2021 16:26:18 +0000 (UTC) Subject: Re: [PATCH 3/9] powerpc/pseries: remove the ppc-cmm file system To: Christoph Hellwig , Al Viro Cc: Andrew Morton , Daniel Vetter , Nadav Amit , "VMware, Inc." , "Michael S. Tsirkin" , 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 References: <20210309155348.974875-1-hch@lst.de> <20210309155348.974875-4-hch@lst.de> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <001be2e1-995c-d5d9-734f-06f75c702b42@redhat.com> Date: Tue, 9 Mar 2021 17:26:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210309155348.974875-4-hch@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09.03.21 16:53, Christoph Hellwig wrote: > Just use the generic anon_inode file system. > > Signed-off-by: Christoph Hellwig > --- > arch/powerpc/platforms/pseries/cmm.c | 27 ++------------------------- > 1 file changed, 2 insertions(+), 25 deletions(-) > > diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c > index 6d36b858b14df1..9d07e6bea7126c 100644 > --- a/arch/powerpc/platforms/pseries/cmm.c > +++ b/arch/powerpc/platforms/pseries/cmm.c > @@ -6,6 +6,7 @@ > * Author(s): Brian King (brking@linux.vnet.ibm.com), > */ > > +#include > #include > #include > #include > @@ -502,19 +503,6 @@ static struct notifier_block cmm_mem_nb = { > }; > > #ifdef CONFIG_BALLOON_COMPACTION > -static struct vfsmount *balloon_mnt; > - > -static int cmm_init_fs_context(struct fs_context *fc) > -{ > - return init_pseudo(fc, PPC_CMM_MAGIC) ? 0 : -ENOMEM; > -} > - > -static struct file_system_type balloon_fs = { > - .name = "ppc-cmm", > - .init_fs_context = cmm_init_fs_context, > - .kill_sb = kill_anon_super, > -}; > - > static int cmm_migratepage(struct balloon_dev_info *b_dev_info, > struct page *newpage, struct page *page, > enum migrate_mode mode) > @@ -573,19 +561,10 @@ static int cmm_balloon_compaction_init(void) > balloon_devinfo_init(&b_dev_info); > b_dev_info.migratepage = cmm_migratepage; > > - balloon_mnt = kern_mount(&balloon_fs); > - if (IS_ERR(balloon_mnt)) { > - rc = PTR_ERR(balloon_mnt); > - balloon_mnt = NULL; > - return rc; > - } > - > - b_dev_info.inode = alloc_anon_inode_sb(balloon_mnt->mnt_sb); > + b_dev_info.inode = alloc_anon_inode(); > if (IS_ERR(b_dev_info.inode)) { > rc = PTR_ERR(b_dev_info.inode); > b_dev_info.inode = NULL; > - kern_unmount(balloon_mnt); > - balloon_mnt = NULL; > return rc; > } > > @@ -597,8 +576,6 @@ static void cmm_balloon_compaction_deinit(void) > if (b_dev_info.inode) > iput(b_dev_info.inode); > b_dev_info.inode = NULL; > - kern_unmount(balloon_mnt); > - balloon_mnt = NULL; > } > #else /* CONFIG_BALLOON_COMPACTION */ > static int cmm_balloon_compaction_init(void) > I always wondered why that was necessary after all (with my limited fs knowledge :) ). a) I assume you want to remove PPC_CMM_MAGIC from include/uapi/linux/magic.h as well? b) Do we still need #include , #include and #include ? Apart from that looks much cleaner. -- Thanks, David / dhildenb