This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / fs / rcfs / super.c
index 8403f28..4ed49fd 100644 (file)
@@ -16,8 +16,7 @@
  *
  */
 
-/*
- * Changes
+/* Changes
  *
  * 08 Mar 2004
  *        Created.
@@ -40,6 +39,7 @@
 #include <asm/uaccess.h>
 
 #include <linux/rcfs.h>
+#include <linux/ckrm.h>
 #include <linux/ckrm_rc.h>
 #include <linux/ckrm_ce.h>
 
@@ -50,7 +50,7 @@ struct rcfs_inode_info *RCFS_I(struct inode *inode)
        return container_of(inode, struct rcfs_inode_info, vfs_inode);
 }
 
-EXPORT_SYMBOL_GPL(RCFS_I);
+EXPORT_SYMBOL(RCFS_I);
 
 static struct inode *rcfs_alloc_inode(struct super_block *sb)
 {
@@ -143,7 +143,7 @@ static int rcfs_fill_super(struct super_block *sb, void *data, int silent)
        }
        sb->s_root = root;
 
-       /* Link inode and core class */
+       // Link inode and core class 
        rootri = RCFS_I(inode);
        rootri->name = kmalloc(strlen(RCFS_ROOT) + 1, GFP_KERNEL);
        if (!rootri->name) {
@@ -159,7 +159,7 @@ static int rcfs_fill_super(struct super_block *sb, void *data, int silent)
        rcfs_rootde = root;
        rcfs_rootri = rootri;
 
-       /* register metatypes */
+       // register metatypes
        for (i = 0; i < CKRM_MAX_CLASSTYPES; i++) {
                clstype = ckrm_classtypes[i];
                if (clstype == NULL)
@@ -167,28 +167,25 @@ static int rcfs_fill_super(struct super_block *sb, void *data, int silent)
                printk(KERN_DEBUG "A non null classtype\n");
 
                if ((rc = rcfs_register_classtype(clstype)))
-                       continue;       /* could return with an error too */
+                       continue;       // could return with an error too 
        }
 
-       /*
-        * do post-mount initializations needed by CE
-        * this is distinct from CE registration done on rcfs module load
-        */
+       // do post-mount initializations needed by CE
+       // this is distinct from CE registration done on rcfs module load
        if (rcfs_engine_regd) {
                if (rcfs_eng_callbacks.mnt)
                        if ((rc = (*rcfs_eng_callbacks.mnt) ())) {
                                printk(KERN_ERR "Error in CE mnt %d\n", rc);
                        }
        }
-       /*
-        * Following comment handled by code above; keep nonetheless if it
-        * can be done better
-        *
-        * register CE's with rcfs 
-        * check if CE loaded
-        * call rcfs_register_engine for each classtype
-        * AND rcfs_mkroot (preferably subsume latter in former)
-        */
+       // Following comment handled by code above; keep nonetheless if it
+       // can be done better
+       //
+       // register CE's with rcfs 
+       // check if CE loaded
+       // call rcfs_register_engine for each classtype
+       // AND rcfs_mkroot (preferably subsume latter in former) 
+
        return 0;
 }
 
@@ -211,6 +208,7 @@ void rcfs_kill_sb(struct super_block *sb)
        rcfs_mounted--;
 
        for (i = 0; i < CKRM_MAX_CLASSTYPES; i++) {
+
                clstype = ckrm_classtypes[i];
                if (clstype == NULL || clstype->rootde == NULL)
                        continue;
@@ -218,39 +216,38 @@ void rcfs_kill_sb(struct super_block *sb)
                if ((rc = rcfs_deregister_classtype(clstype))) {
                        printk(KERN_ERR "Error removing classtype %s\n",
                               clstype->name);
+                       // return ;   // can also choose to stop here
                }
        }
 
-       /*
-        * do pre-umount shutdown needed by CE
-        * this is distinct from CE deregistration done on rcfs module unload
-        */
+       // do pre-umount shutdown needed by CE
+       // this is distinct from CE deregistration done on rcfs module unload
        if (rcfs_engine_regd) {
                if (rcfs_eng_callbacks.umnt)
                        if ((rc = (*rcfs_eng_callbacks.umnt) ())) {
                                printk(KERN_ERR "Error in CE umnt %d\n", rc);
-                               /* TODO: return ; until error handling improves */
+                               // return ; until error handling improves
                        }
        }
-       /*
-        * Following comment handled by code above; keep nonetheless if it 
-        * can be done better
-        *
-        * deregister CE with rcfs
-        * Check if loaded
-        * if ce is in  one directory /rcfs/ce, 
-        *       rcfs_deregister_engine for all classtypes within above 
-        *             codebase 
-        *       followed by
-        *       rcfs_rmroot here
-        * if ce in multiple (per-classtype) directories
-        *       call rbce_deregister_engine within ckrm_deregister_classtype
-        *
-        * following will automatically clear rcfs root entry including its 
-        *  rcfs_inode_info
-        */
+       // Following comment handled by code above; keep nonetheless if it 
+       // can be done better
+       //
+       // deregister CE with rcfs
+       // Check if loaded
+       // if ce is in  one directory /rcfs/ce, 
+       //       rcfs_deregister_engine for all classtypes within above 
+       //             codebase 
+       //       followed by
+       //       rcfs_rmroot here
+       // if ce in multiple (per-classtype) directories
+       //       call rbce_deregister_engine within ckrm_deregister_classtype
+
+       // following will automatically clear rcfs root entry including its 
+       //  rcfs_inode_info
 
        generic_shutdown_super(sb);
+
+       // printk(KERN_ERR "Removed all entries\n");
 }
 
 static struct file_system_type rcfs_fs_type = {
@@ -275,20 +272,21 @@ static int __init init_rcfs_fs(void)
        ret = register_filesystem(&rcfs_fs_type);
        if (ret)
                goto init_register_err;
+
        ret = rcfs_init_inodecache();
        if (ret)
                goto init_cache_err;
+
        rcfs_fn = my_rcfs_fn;
-       /*
-        * Due to tight coupling of this module with ckrm
-        * do not allow this module to be removed.
-        */
+
+       // Due to tight coupling of this module with ckrm
+       // do not allow this module to be removed.
        try_module_get(THIS_MODULE);
        return ret;
 
-init_cache_err:
+      init_cache_err:
        unregister_filesystem(&rcfs_fs_type);
-init_register_err:
+      init_register_err:
        return ret;
 }
 
@@ -299,6 +297,6 @@ static void __exit exit_rcfs_fs(void)
 }
 
 module_init(init_rcfs_fs)
-module_exit(exit_rcfs_fs)
+    module_exit(exit_rcfs_fs)
 
-MODULE_LICENSE("GPL");
+    MODULE_LICENSE("GPL");