1*d6910058SThomas Gleixner // SPDX-License-Identifier: GPL-2.0-or-later
2ebc921caSIan Kent /*
3ebc921caSIan Kent * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
4ebc921caSIan Kent */
5ebc921caSIan Kent
6ebc921caSIan Kent #include <linux/module.h>
7ebc921caSIan Kent #include <linux/init.h>
8ebc921caSIan Kent #include "autofs_i.h"
9ebc921caSIan Kent
autofs_mount(struct file_system_type * fs_type,int flags,const char * dev_name,void * data)10ebc921caSIan Kent static struct dentry *autofs_mount(struct file_system_type *fs_type,
11ebc921caSIan Kent int flags, const char *dev_name, void *data)
12ebc921caSIan Kent {
13ebc921caSIan Kent return mount_nodev(fs_type, flags, data, autofs_fill_super);
14ebc921caSIan Kent }
15ebc921caSIan Kent
1655f0d820SIan Kent struct file_system_type autofs_fs_type = {
17ebc921caSIan Kent .owner = THIS_MODULE,
18ebc921caSIan Kent .name = "autofs",
19ebc921caSIan Kent .mount = autofs_mount,
20ebc921caSIan Kent .kill_sb = autofs_kill_sb,
21ebc921caSIan Kent };
22ebc921caSIan Kent MODULE_ALIAS_FS("autofs");
23d02d21eaSLinus Torvalds MODULE_ALIAS("autofs");
24ebc921caSIan Kent
init_autofs_fs(void)25ebc921caSIan Kent static int __init init_autofs_fs(void)
26ebc921caSIan Kent {
27ebc921caSIan Kent int err;
28ebc921caSIan Kent
29ebc921caSIan Kent autofs_dev_ioctl_init();
30ebc921caSIan Kent
31ebc921caSIan Kent err = register_filesystem(&autofs_fs_type);
32ebc921caSIan Kent if (err)
33ebc921caSIan Kent autofs_dev_ioctl_exit();
34ebc921caSIan Kent
35ebc921caSIan Kent return err;
36ebc921caSIan Kent }
37ebc921caSIan Kent
exit_autofs_fs(void)38ebc921caSIan Kent static void __exit exit_autofs_fs(void)
39ebc921caSIan Kent {
40ebc921caSIan Kent autofs_dev_ioctl_exit();
41ebc921caSIan Kent unregister_filesystem(&autofs_fs_type);
42ebc921caSIan Kent }
43ebc921caSIan Kent
44ebc921caSIan Kent module_init(init_autofs_fs)
45ebc921caSIan Kent module_exit(exit_autofs_fs)
46ebc921caSIan Kent MODULE_LICENSE("GPL");
47