Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2687862pxb; Tue, 9 Mar 2021 08:30:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJyF22KabQ7B5GlceWootWRZ+/rJFrrZoMH4UEsH5TS9KHUIVemeNcRxldKYVEob4zU7o2nE X-Received: by 2002:a05:6402:3089:: with SMTP id de9mr5174671edb.10.1615307448680; Tue, 09 Mar 2021 08:30:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615307448; cv=none; d=google.com; s=arc-20160816; b=CjDBEwi9IlXTrRERPOHI1+JJuJ+chDlTD+s3g0Ulo68haPE3iwjKHKGyEUnwASLijc RYHbYqMn67fpDgvRnaQ2aBQcKBTTefLDnFq4HuhldZuYFLzLRBgoUmwvxfla0X3zYz1t SlDmmfpsXYDjnF39YRO++Qd5KZqgqWNTtyweu2s7UpNBqPh5p5ZNAcMIJ9/icSN4q+Cg 4bdYyU1CGb6kwbr5C/IsJ1+uJXvNgUM8D+k3Na8cflmgWQFFb/YclBj6yq0kPafux6Hb EkvekHxhDVrIg5n3LpARP6rg1NhCcv7BDzgJVd2KfqM+suvoDSmuIrN4a5VcNVbEQOG4 ejcw== 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=3Iv7BBIxQ8+W8sz1TqvejVKfcifyHSm+wQDXMt7okOA=; b=w5Gl7DH0OHcKiI7Bvd0KiSJeuLJ4Hu6odJgM6A9HecxN0HwPFvJfmNezHY61MBQYlb ZsmQVXDcPXOzSsmKIfzYMRZM3NnYhr/G5hhQ0mNJtoYIo9vuzJLo1+3dnHuGONvMUckh Vg0YSgNkr8kr4sIrQvguM2wJ7VtoePKrg+NIYOJTXGchpGlDNyD0e56F6/ylUt9ZlRAw iXYjea5THTSnsa69VBGEJDden0cGM0PKbsCWhIn7cjFJ6z5oUDtQ4f0Q0AvSEDHVSJUd ZZkfV8+Op4swK4589ySlhqjNzQ83kiuc/5E3yFaaEH2cRnIpitXwzsyy0FGztPr7ZIy/ 6eXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AN555z0O; 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 dc11si8983371edb.17.2021.03.09.08.30.26; Tue, 09 Mar 2021 08:30:48 -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=AN555z0O; 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 S231295AbhCIQ2p (ORCPT + 99 others); Tue, 9 Mar 2021 11:28:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:38170 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229689AbhCIQ2b (ORCPT ); Tue, 9 Mar 2021 11:28:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615307310; 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=3Iv7BBIxQ8+W8sz1TqvejVKfcifyHSm+wQDXMt7okOA=; b=AN555z0OEIyr9jbLd9t3/SeFQbAtEU8u5CyC88aWlHSEnA8Ztm+PFW1tSkYgo5MolBfy+F xu8nzt0LCBgi/urvaJCTKSb4dNYDpUTMQsZlty1CYIU+5PIDM/nFF1G0vVLyybCWNaEvER oVhtMIAk2rxlpXROP2ZHNoCz6+D4WiI= 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-18-2LKAOAxWMcKIauY_Ng6y0g-1; Tue, 09 Mar 2021 11:28:28 -0500 X-MC-Unique: 2LKAOAxWMcKIauY_Ng6y0g-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 90CCD108BD0B; Tue, 9 Mar 2021 16:28:26 +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 E403E10023AE; Tue, 9 Mar 2021 16:28:16 +0000 (UTC) Subject: Re: [PATCH 5/9] vmw_balloon: remove the balloon-vmware 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-6-hch@lst.de> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <8bdd6f30-3cd1-ad7f-df95-bbb85623ae64@redhat.com> Date: Tue, 9 Mar 2021 17:28:16 +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-6-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.22 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 > --- > drivers/misc/vmw_balloon.c | 24 ++---------------------- > 1 file changed, 2 insertions(+), 22 deletions(-) > > diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c > index 5d057a05ddbee8..be4be32f858253 100644 > --- a/drivers/misc/vmw_balloon.c > +++ b/drivers/misc/vmw_balloon.c > @@ -16,6 +16,7 @@ > //#define DEBUG > #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt > > +#include > #include > #include > #include > @@ -1735,20 +1736,6 @@ static inline void vmballoon_debugfs_exit(struct vmballoon *b) > > > #ifdef CONFIG_BALLOON_COMPACTION > - > -static int vmballoon_init_fs_context(struct fs_context *fc) > -{ > - return init_pseudo(fc, BALLOON_VMW_MAGIC) ? 0 : -ENOMEM; > -} > - > -static struct file_system_type vmballoon_fs = { > - .name = "balloon-vmware", > - .init_fs_context = vmballoon_init_fs_context, > - .kill_sb = kill_anon_super, > -}; > - > -static struct vfsmount *vmballoon_mnt; > - > /** > * vmballoon_migratepage() - migrates a balloon page. > * @b_dev_info: balloon device information descriptor. > @@ -1878,8 +1865,6 @@ static void vmballoon_compaction_deinit(struct vmballoon *b) > iput(b->b_dev_info.inode); > > b->b_dev_info.inode = NULL; > - kern_unmount(vmballoon_mnt); > - vmballoon_mnt = NULL; > } > > /** > @@ -1895,13 +1880,8 @@ static void vmballoon_compaction_deinit(struct vmballoon *b) > */ > static __init int vmballoon_compaction_init(struct vmballoon *b) > { > - vmballoon_mnt = kern_mount(&vmballoon_fs); > - if (IS_ERR(vmballoon_mnt)) > - return PTR_ERR(vmballoon_mnt); > - > b->b_dev_info.migratepage = vmballoon_migratepage; > - b->b_dev_info.inode = alloc_anon_inode_sb(vmballoon_mnt->mnt_sb); > - > + b->b_dev_info.inode = alloc_anon_inode(); > if (IS_ERR(b->b_dev_info.inode)) > return PTR_ERR(b->b_dev_info.inode); > > Same comment regarding BALLOON_VMW_MAGIC and includes (mount.h, pseudo_fs.h). Apart from that looks good. -- Thanks, David / dhildenb