autofs: convert autofs to use the new mount api
[linux-2.6-block.git] / fs / autofs / init.c
CommitLineData
d6910058 1// SPDX-License-Identifier: GPL-2.0-or-later
ebc921ca
IK
2/*
3 * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
ebc921ca
IK
4 */
5
6#include <linux/module.h>
7#include <linux/init.h>
8#include "autofs_i.h"
9
55f0d820 10struct file_system_type autofs_fs_type = {
ebc921ca
IK
11 .owner = THIS_MODULE,
12 .name = "autofs",
e6ec453b
IK
13 .init_fs_context = autofs_init_fs_context,
14 .parameters = autofs_param_specs,
ebc921ca
IK
15 .kill_sb = autofs_kill_sb,
16};
17MODULE_ALIAS_FS("autofs");
d02d21ea 18MODULE_ALIAS("autofs");
ebc921ca
IK
19
20static int __init init_autofs_fs(void)
21{
22 int err;
23
24 autofs_dev_ioctl_init();
25
26 err = register_filesystem(&autofs_fs_type);
27 if (err)
28 autofs_dev_ioctl_exit();
29
30 return err;
31}
32
33static void __exit exit_autofs_fs(void)
34{
35 autofs_dev_ioctl_exit();
36 unregister_filesystem(&autofs_fs_type);
37}
38
39module_init(init_autofs_fs)
40module_exit(exit_autofs_fs)
41MODULE_LICENSE("GPL");