From: David Hildenbrand <david@redhat.com>
To: Christoph Hellwig <hch@lst.de>, Al Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Daniel Vetter <daniel@ffwll.ch>, Nadav Amit <namit@vmware.com>,
"VMware, Inc." <pv-drivers@vmware.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>,
Jason Gunthorpe <jgg@nvidia.com>,
Alex Williamson <alex.williamson@redhat.com>,
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: Re: [PATCH 5/9] vmw_balloon: remove the balloon-vmware file system
Date: Tue, 9 Mar 2021 17:28:16 +0100 [thread overview]
Message-ID: <8bdd6f30-3cd1-ad7f-df95-bbb85623ae64@redhat.com> (raw)
In-Reply-To: <20210309155348.974875-6-hch@lst.de>
On 09.03.21 16:53, Christoph Hellwig wrote:
> Just use the generic anon_inode file system.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> 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 <linux/anon_inodes.h>
> #include <linux/types.h>
> #include <linux/io.h>
> #include <linux/kernel.h>
> @@ -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
next prev parent reply other threads:[~2021-03-09 16:29 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-09 15:53 make alloc_anon_inode more useful Christoph Hellwig
2021-03-09 15:53 ` [PATCH 1/9] fs: rename alloc_anon_inode to alloc_anon_inode_sb Christoph Hellwig
2021-03-09 16:21 ` David Hildenbrand
2021-03-09 19:33 ` Gao Xiang
2021-03-10 6:39 ` Minchan Kim
2021-03-10 8:30 ` Christoph Hellwig
2021-03-10 9:33 ` Christian Brauner
2021-03-09 15:53 ` [PATCH 2/9] fs: add an argument-less alloc_anon_inode Christoph Hellwig
2021-03-09 16:22 ` David Hildenbrand
2021-03-09 19:34 ` Gao Xiang
2021-03-10 9:35 ` Christian Brauner
2021-03-09 15:53 ` [PATCH 3/9] powerpc/pseries: remove the ppc-cmm file system Christoph Hellwig
2021-03-09 16:26 ` David Hildenbrand
2021-03-09 16:30 ` Jason Gunthorpe
2021-03-10 16:29 ` Al Viro
2021-03-11 8:42 ` Christoph Hellwig
2021-03-09 15:53 ` [PATCH 4/9] drm: remove the drm " Christoph Hellwig
2021-03-10 16:32 ` Al Viro
2021-03-11 8:35 ` Christoph Hellwig
2021-03-09 15:53 ` [PATCH 5/9] vmw_balloon: remove the balloon-vmware " Christoph Hellwig
2021-03-09 16:28 ` David Hildenbrand [this message]
2021-03-09 15:53 ` [PATCH 6/9] virtio_balloon: remove the balloon-kvm " Christoph Hellwig
2021-03-09 16:29 ` David Hildenbrand
2021-03-09 15:53 ` [PATCH 7/9] iomem: remove the iomem " Christoph Hellwig
2021-03-14 13:55 ` [iomem] e14497b88f: BUG:KASAN:null-ptr-deref_in_alloc_anon_inode kernel test robot
2021-03-09 15:53 ` [PATCH 8/9] z3fold: remove the z3fold file system Christoph Hellwig
2021-03-09 15:53 ` [PATCH 9/9] zsmalloc: remove the zsmalloc " Christoph Hellwig
2021-03-10 6:44 ` Minchan Kim
2021-03-09 16:54 ` make alloc_anon_inode more useful Jason Gunthorpe
2021-03-10 8:32 ` Christoph Hellwig
2021-03-10 4:05 ` Matthew Wilcox
2021-03-10 8:37 ` Christoph Hellwig
2023-02-03 9:49 ` Jingbo Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8bdd6f30-3cd1-ad7f-df95-bbb85623ae64@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alex.williamson@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hch@lst.de \
--cc=jgg@nvidia.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=minchan@kernel.org \
--cc=mst@redhat.com \
--cc=namit@vmware.com \
--cc=ngupta@vflare.org \
--cc=pv-drivers@vmware.com \
--cc=viro@zeniv.linux.org.uk \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).