blob: d3f55e87433890384b3a56695b4ca26a24656193 [file] [log] [blame]
Thomas Gleixnerd6910052019-05-22 09:51:29 +02001// SPDX-License-Identifier: GPL-2.0-or-later
Ian Kentebc921c2018-06-07 17:11:13 -07002/*
3 * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
Ian Kentebc921c2018-06-07 17:11:13 -07004 */
5
6#include <linux/module.h>
7#include <linux/init.h>
8#include "autofs_i.h"
9
10static struct dentry *autofs_mount(struct file_system_type *fs_type,
11 int flags, const char *dev_name, void *data)
12{
13 return mount_nodev(fs_type, flags, data, autofs_fill_super);
14}
15
Ian Kent55f0d822019-01-03 15:27:33 -080016struct file_system_type autofs_fs_type = {
Ian Kentebc921c2018-06-07 17:11:13 -070017 .owner = THIS_MODULE,
18 .name = "autofs",
19 .mount = autofs_mount,
20 .kill_sb = autofs_kill_sb,
21};
22MODULE_ALIAS_FS("autofs");
Linus Torvaldsd02d21e2018-07-04 18:17:51 -070023MODULE_ALIAS("autofs");
Ian Kentebc921c2018-06-07 17:11:13 -070024
25static int __init init_autofs_fs(void)
26{
27 int err;
28
29 autofs_dev_ioctl_init();
30
31 err = register_filesystem(&autofs_fs_type);
32 if (err)
33 autofs_dev_ioctl_exit();
34
35 return err;
36}
37
38static void __exit exit_autofs_fs(void)
39{
40 autofs_dev_ioctl_exit();
41 unregister_filesystem(&autofs_fs_type);
42}
43
44module_init(init_autofs_fs)
45module_exit(exit_autofs_fs)
46MODULE_LICENSE("GPL");