We have namespaces, so use them for all vfs-exported namespaces so that filesystems can use them, but not anything else. Some in-kernel drivers that do direct filesystem accesses (because they serve up files) are also allowed access to these symbols to keep 'make allmodconfig' builds working properly, but it is not needed for Android kernel images. Bug: 157965270 Bug: 210074446 Cc: Matthias Maennich <maennich@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Iaf6140baf3a18a516ab2d5c3966235c42f3f70de
50 lines
951 B
C
50 lines
951 B
C
// 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");
|