static int __init aufs_init(void) { int err, i; char *p; p = au_esc_chars; for (i = 1; i <= ' '; i++) *p++ = i; *p++ = '\\'; *p++ = '\x7f'; *p = 0; au_dir_roflags = au_file_roflags(O_DIRECTORY | O_LARGEFILE); au_sbilist_init(); sysaufs_brs_init(); au_debug_init(); au_dy_init(); err = sysaufs_init(); if (unlikely(err)) goto out; err = au_procfs_init(); if (unlikely(err)) goto out_sysaufs; err = au_wkq_init(); if (unlikely(err)) goto out_procfs; err = au_hnotify_init(); if (unlikely(err)) goto out_wkq; err = au_sysrq_init(); if (unlikely(err)) goto out_hin; err = au_cache_init(); if (unlikely(err)) goto out_sysrq; err = register_filesystem(&aufs_fs_type); if (unlikely(err)) goto out_cache; /* since we define pr_fmt, call printk directly */ printk(KERN_INFO AUFS_NAME " " AUFS_VERSION "\n"); goto out; /* success */ out_cache: au_cache_fin(); out_sysrq: au_sysrq_fin(); out_hin: au_hnotify_fin(); out_wkq: au_wkq_fin(); out_procfs: au_procfs_fin(); out_sysaufs: sysaufs_fin(); au_dy_fin(); out: return err; }
static void __exit aufs_exit(void) { unregister_filesystem(&aufs_fs_type); au_cache_fin(); au_sysrq_fin(); au_hinotify_fin(); au_wkq_fin(); sysaufs_fin(); }
static void __exit aufs_exit(void) { unregister_filesystem(&aufs_fs_type); au_cache_fin(); au_sysrq_fin(); au_hnotify_fin(); au_loopback_fin(); au_wkq_fin(); au_procfs_fin(); sysaufs_fin(); au_dy_fin(); }