summaryrefslogtreecommitdiff
path: root/fs/cachefiles/main.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2021-10-31 12:58:05 +0000
committerDavid Howells <dhowells@redhat.com>2022-01-07 09:22:19 +0000
commit850cba069c266d6f31b81c5a199052a3482a63fc (patch)
tree9fa268c3d0607be533d62df8286402f89c79bac6 /fs/cachefiles/main.c
parent01491a756578d8602dfdfc79f2638c519bfdadb7 (diff)
cachefiles: Delete the cachefiles driver pending rewrite
Delete the code from the cachefiles driver to make it easier to rewrite and resubmit in a logical manner. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> cc: linux-cachefs@redhat.com Link: https://lore.kernel.org/r/163819577641.215744.12718114397770666596.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/163906883770.143852.4149714614981373410.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/163967076066.1823006.7175712134577687753.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/164021483619.640689.7586546280515844702.stgit@warthog.procyon.org.uk/ # v4
Diffstat (limited to 'fs/cachefiles/main.c')
-rw-r--r--fs/cachefiles/main.c95
1 files changed, 0 insertions, 95 deletions
diff --git a/fs/cachefiles/main.c b/fs/cachefiles/main.c
deleted file mode 100644
index 9c8d34c49b12..000000000000
--- a/fs/cachefiles/main.c
+++ /dev/null
@@ -1,95 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/* Network filesystem caching backend to use cache files on a premounted
- * filesystem
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- */
-
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/sched.h>
-#include <linux/completion.h>
-#include <linux/slab.h>
-#include <linux/fs.h>
-#include <linux/file.h>
-#include <linux/namei.h>
-#include <linux/mount.h>
-#include <linux/statfs.h>
-#include <linux/sysctl.h>
-#include <linux/miscdevice.h>
-#define CREATE_TRACE_POINTS
-#include "internal.h"
-
-unsigned cachefiles_debug;
-module_param_named(debug, cachefiles_debug, uint, S_IWUSR | S_IRUGO);
-MODULE_PARM_DESC(cachefiles_debug, "CacheFiles debugging mask");
-
-MODULE_DESCRIPTION("Mounted-filesystem based cache");
-MODULE_AUTHOR("Red Hat, Inc.");
-MODULE_LICENSE("GPL");
-
-struct kmem_cache *cachefiles_object_jar;
-
-static struct miscdevice cachefiles_dev = {
- .minor = MISC_DYNAMIC_MINOR,
- .name = "cachefiles",
- .fops = &cachefiles_daemon_fops,
-};
-
-static void cachefiles_object_init_once(void *_object)
-{
- struct cachefiles_object *object = _object;
-
- memset(object, 0, sizeof(*object));
- spin_lock_init(&object->work_lock);
-}
-
-/*
- * initialise the fs caching module
- */
-static int __init cachefiles_init(void)
-{
- int ret;
-
- ret = misc_register(&cachefiles_dev);
- if (ret < 0)
- goto error_dev;
-
- /* create an object jar */
- ret = -ENOMEM;
- cachefiles_object_jar =
- kmem_cache_create("cachefiles_object_jar",
- sizeof(struct cachefiles_object),
- 0,
- SLAB_HWCACHE_ALIGN,
- cachefiles_object_init_once);
- if (!cachefiles_object_jar) {
- pr_notice("Failed to allocate an object jar\n");
- goto error_object_jar;
- }
-
- pr_info("Loaded\n");
- return 0;
-
-error_object_jar:
- misc_deregister(&cachefiles_dev);
-error_dev:
- pr_err("failed to register: %d\n", ret);
- return ret;
-}
-
-fs_initcall(cachefiles_init);
-
-/*
- * clean up on module removal
- */
-static void __exit cachefiles_exit(void)
-{
- pr_info("Unloading\n");
-
- kmem_cache_destroy(cachefiles_object_jar);
- misc_deregister(&cachefiles_dev);
-}
-
-module_exit(cachefiles_exit);