blob: c0c1db2cc6ea7aa12ed64b8415b9558b884a0051 [file] [log] [blame]
Ian Kentebc921c2018-06-07 17:11:13 -07001/*
2 * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
3 *
4 * This file is part of the Linux kernel and is made available under
5 * the terms of the GNU General Public License, version 2, or at your
6 * option, any later version, incorporated herein by reference.
7 */
8
9#include <linux/module.h>
10#include <linux/init.h>
11#include "autofs_i.h"
12
13static struct dentry *autofs_mount(struct file_system_type *fs_type,
14 int flags, const char *dev_name, void *data)
15{
16 return mount_nodev(fs_type, flags, data, autofs_fill_super);
17}
18
Ian Kent55f0d822019-01-03 15:27:33 -080019struct file_system_type autofs_fs_type = {
Ian Kentebc921c2018-06-07 17:11:13 -070020 .owner = THIS_MODULE,
21 .name = "autofs",
22 .mount = autofs_mount,
23 .kill_sb = autofs_kill_sb,
24};
25MODULE_ALIAS_FS("autofs");
Linus Torvaldsd02d21e2018-07-04 18:17:51 -070026MODULE_ALIAS("autofs");
Ian Kentebc921c2018-06-07 17:11:13 -070027
28static int __init init_autofs_fs(void)
29{
30 int err;
31
32 autofs_dev_ioctl_init();
33
34 err = register_filesystem(&autofs_fs_type);
35 if (err)
36 autofs_dev_ioctl_exit();
37
38 return err;
39}
40
41static void __exit exit_autofs_fs(void)
42{
43 autofs_dev_ioctl_exit();
44 unregister_filesystem(&autofs_fs_type);
45}
46
47module_init(init_autofs_fs)
48module_exit(exit_autofs_fs)
49MODULE_LICENSE("GPL");