hc
2024-05-09 b9d5c334faa47a75f1f28e72d203fc0334e8471d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright 2018 Google LLC
 */
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/module.h>
 
#include <uapi/linux/incrementalfs.h>
 
#include "sysfs.h"
#include "vfs.h"
 
static struct file_system_type incfs_fs_type = {
   .owner = THIS_MODULE,
   .name = INCFS_NAME,
   .mount = incfs_mount_fs,
   .kill_sb = incfs_kill_sb,
   .fs_flags = 0
};
 
static int __init init_incfs_module(void)
{
   int err = 0;
 
   err = incfs_init_sysfs();
   if (err)
       return err;
 
   err = register_filesystem(&incfs_fs_type);
   if (err)
       incfs_cleanup_sysfs();
 
   return err;
}
 
static void __exit cleanup_incfs_module(void)
{
   incfs_cleanup_sysfs();
   unregister_filesystem(&incfs_fs_type);
}
 
module_init(init_incfs_module);
module_exit(cleanup_incfs_module);
 
MODULE_LICENSE("GPL v2");
MODULE_IMPORT_NS(ANDROID_GKI_VFS_EXPORT_ONLY);
MODULE_AUTHOR("Eugene Zemtsov <ezemtsov@google.com>");
MODULE_DESCRIPTION("Incremental File System");