Register classification engines (CKRM RCFS rewrite)
Functions to register/deregister classification engines with RCFS. Move the
functions to inode.c
Signed-off-by: Shailabh Nagar <[EMAIL PROTECTED]>
fs/rcfs/rootdir.c | 62 ------------------------------------------------------
fs/rcfs/inode.c | 35 ++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 62 deletions(-)
Index: linux-2.6.12/fs/rcfs/inode.c
===================================================================
--- linux-2.6.12.orig/fs/rcfs/inode.c 2005-08-09 15:30:40.483746256 -0400
+++ linux-2.6.12/fs/rcfs/inode.c 2005-08-09 15:30:40.557735008 -0400
@@ -630,6 +630,41 @@ out:
}
+/*************************
+ *
+ * Classification engines
+ *
+ ************************/
+
+struct rbce_eng_callback rcfs_eng_callbacks = {
+ NULL, NULL
+};
+
+int rcfs_register_engine(struct rbce_eng_callback * rcbs)
+{
+ if (!rcbs->mkdir || rcfs_eng_callbacks.mkdir) {
+ return -EINVAL;
+ }
+ rcfs_eng_callbacks = *rcbs;
+ rcfs_engine_regd++;
+ return 0;
+}
+EXPORT_SYMBOL_GPL(rcfs_register_engine);
+
+int rcfs_unregister_engine(struct rbce_eng_callback * rcbs)
+{
+ if (!rcbs->mkdir || !rcfs_eng_callbacks.mkdir ||
+ (rcbs->mkdir != rcfs_eng_callbacks.mkdir)) {
+ return -EINVAL;
+ }
+ rcfs_eng_callbacks.mkdir = NULL;
+ rcfs_eng_callbacks.rmdir = NULL;
+ rcfs_engine_regd--;
+ return 0;
+}
+EXPORT_SYMBOL_GPL(rcfs_unregister_engine);
+
+
static struct file_system_type rcfs_fs_type = {
.owner = THIS_MODULE,
.name = "rcfs",
Index: linux-2.6.12/fs/rcfs/rootdir.c
===================================================================
--- linux-2.6.12.orig/fs/rcfs/rootdir.c 2005-08-09 15:30:40.483746256 -0400
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,62 +0,0 @@
-/*
- * fs/rcfs/rootdir.c
- *
- * Copyright (C) Vivek Kashyap, IBM Corp. 2004
- *
- *
- * Functions for creating root directories and magic files
- * for classtypes and classification engines under rcfs
- *
- * Latest version, more details at http://ckrm.sf.net
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License
- * as published by the Free Software Foundation.
- */
-
-#include <linux/module.h>
-#include <linux/fs.h>
-#include <linux/namei.h>
-#include <linux/namespace.h>
-#include <linux/dcache.h>
-#include <linux/seq_file.h>
-#include <linux/pagemap.h>
-#include <linux/highmem.h>
-#include <linux/init.h>
-#include <linux/string.h>
-#include <linux/smp_lock.h>
-#include <linux/backing-dev.h>
-#include <linux/parser.h>
-#include <linux/rcfs.h>
-#include <asm/uaccess.h>
-
-struct rbce_eng_callback rcfs_eng_callbacks = {
- NULL, NULL
-};
-
-int rcfs_register_engine(struct rbce_eng_callback * rcbs)
-{
- if (!rcbs->mkdir || rcfs_eng_callbacks.mkdir) {
- return -EINVAL;
- }
- rcfs_eng_callbacks = *rcbs;
- rcfs_engine_regd++;
- return 0;
-}
-
-EXPORT_SYMBOL_GPL(rcfs_register_engine);
-
-int rcfs_unregister_engine(struct rbce_eng_callback * rcbs)
-{
- if (!rcbs->mkdir || !rcfs_eng_callbacks.mkdir ||
- (rcbs->mkdir != rcfs_eng_callbacks.mkdir)) {
- return -EINVAL;
- }
- rcfs_eng_callbacks.mkdir = NULL;
- rcfs_eng_callbacks.rmdir = NULL;
- rcfs_engine_regd--;
- return 0;
-}
-
-EXPORT_SYMBOL_GPL(rcfs_unregister_engine);
-