init.c 987 B

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