]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - fs/autofs4/init.c
powerpc/pseries: Support firmware disable of RFI flush
[mirror_ubuntu-artful-kernel.git] / fs / autofs4 / init.c
CommitLineData
e9a7c2f1
IK
1/*
2 * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved
1da177e4
LT
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.
e9a7c2f1 7 */
1da177e4
LT
8
9#include <linux/module.h>
10#include <linux/init.h>
11#include "autofs_i.h"
12
3c26ff6e
AV
13static struct dentry *autofs_mount(struct file_system_type *fs_type,
14 int flags, const char *dev_name, void *data)
1da177e4 15{
3c26ff6e 16 return mount_nodev(fs_type, flags, data, autofs4_fill_super);
1da177e4
LT
17}
18
19static struct file_system_type autofs_fs_type = {
20 .owner = THIS_MODULE,
21 .name = "autofs",
3c26ff6e 22 .mount = autofs_mount,
6ce31523 23 .kill_sb = autofs4_kill_sb,
1da177e4 24};
7f78e035 25MODULE_ALIAS_FS("autofs");
1da177e4
LT
26
27static int __init init_autofs4_fs(void)
28{
8d7b48e0
IK
29 int err;
30
54bf586e
AV
31 autofs_dev_ioctl_init();
32
8d7b48e0
IK
33 err = register_filesystem(&autofs_fs_type);
34 if (err)
54bf586e 35 autofs_dev_ioctl_exit();
8d7b48e0
IK
36
37 return err;
1da177e4
LT
38}
39
40static void __exit exit_autofs4_fs(void)
41{
8d7b48e0 42 autofs_dev_ioctl_exit();
1da177e4
LT
43 unregister_filesystem(&autofs_fs_type);
44}
45
46module_init(init_autofs4_fs)
47module_exit(exit_autofs4_fs)
48MODULE_LICENSE("GPL");