summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-03-25 08:38:23 -0800
committerAl Viro <viro@zeniv.linux.org.uk>2019-05-25 14:00:07 -0800
commit8e9231f819e32d8efb53b0f17f293bab74bed8ce (patch)
tree050fd5e714c8ac0bba9d9666763c7d2cc99c44b2
parent4fa7ec5db7e731a3db26b9647f39b0595f74347d (diff)
downloadlinux-stable-8e9231f819e32d8efb53b0f17f293bab74bed8ce.tar.gz
linux-stable-8e9231f819e32d8efb53b0f17f293bab74bed8ce.tar.bz2
linux-stable-8e9231f819e32d8efb53b0f17f293bab74bed8ce.tar.xz
linux-stable-8e9231f819e32d8efb53b0f17f293bab74bed8ce.zip
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: David 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: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--mm/zsmalloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index ef230be8c03e..910d0407f8f1 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -52,6 +52,7 @@
52#include <linux/zsmalloc.h> 52#include <linux/zsmalloc.h>
53#include <linux/zpool.h> 53#include <linux/zpool.h>
54#include <linux/mount.h> 54#include <linux/mount.h>
55#include <linux/pseudo_fs.h>
55#include <linux/migrate.h> 56#include <linux/migrate.h>
56#include <linux/pagemap.h> 57#include <linux/pagemap.h>
57#include <linux/fs.h> 58#include <linux/fs.h>
@@ -1814,15 +1815,14 @@ static void lock_zspage(struct zspage *zspage)
1814 } while ((page = get_next_page(page)) != NULL); 1815 } while ((page = get_next_page(page)) != NULL);
1815} 1816}
1816 1817
1817static struct dentry *zs_mount(struct file_system_type *fs_type, 1818static int zs_init_fs_context(struct fs_context *fc)
1818 int flags, const char *dev_name, void *data)
1819{ 1819{
1820 return mount_pseudo(fs_type, NULL, NULL, ZSMALLOC_MAGIC); 1820 return init_pseudo(fc, ZSMALLOC_MAGIC) ? 0 : -ENOMEM;
1821} 1821}
1822 1822
1823static struct file_system_type zsmalloc_fs = { 1823static struct file_system_type zsmalloc_fs = {
1824 .name = "zsmalloc", 1824 .name = "zsmalloc",
1825 .mount = zs_mount, 1825 .init_fs_context = zs_init_fs_context,
1826 .kill_sb = kill_anon_super, 1826 .kill_sb = kill_anon_super,
1827}; 1827};
1828 1828