Commit 8e9231f8 authored by David Howells's avatar David Howells Committed by Al Viro
Browse files

vfs: Convert zsmalloc to use the new mount API



Convert the zsmalloc filesystem to the new internal mount API as the old
one will be obsoleted and removed.  This allows greater flexibility in
communication of mount parameters between userspace, the VFS and the
filesystem.

See Documentation/filesystems/mount_api.txt for more information.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
cc: Minchan Kim <minchan@kernel.org>
cc: Nitin Gupta <ngupta@vflare.org>
cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
cc: linux-mm@kvack.org
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 4fa7ec5d
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@
#include <linux/zsmalloc.h>
#include <linux/zpool.h>
#include <linux/mount.h>
#include <linux/pseudo_fs.h>
#include <linux/migrate.h>
#include <linux/pagemap.h>
#include <linux/fs.h>
@@ -1814,15 +1815,14 @@ static void lock_zspage(struct zspage *zspage)
	} while ((page = get_next_page(page)) != NULL);
}

static struct dentry *zs_mount(struct file_system_type *fs_type,
				int flags, const char *dev_name, void *data)
static int zs_init_fs_context(struct fs_context *fc)
{
	return mount_pseudo(fs_type, NULL, NULL, ZSMALLOC_MAGIC);
	return init_pseudo(fc, ZSMALLOC_MAGIC) ? 0 : -ENOMEM;
}

static struct file_system_type zsmalloc_fs = {
	.name		= "zsmalloc",
	.mount		= zs_mount,
	.init_fs_context = zs_init_fs_context,
	.kill_sb	= kill_anon_super,
};