]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - include/linux/module.h
module: Make the 'usage' lists be two-way
[karo-tx-linux.git] / include / linux / module.h
index 515d53ae6a795e9b73bbf0388aa8966be1014924..680db9e2ac365e4758abf45733493db3ac35044d 100644 (file)
@@ -359,7 +359,9 @@ struct module
 
 #ifdef CONFIG_MODULE_UNLOAD
        /* What modules depend on me? */
-       struct list_head modules_which_use_me;
+       struct list_head source_list;
+       /* What modules do I depend on? */
+       struct list_head target_list;
 
        /* Who is waiting for us to be unloaded */
        struct task_struct *waiter;
@@ -465,8 +467,7 @@ static inline void __module_get(struct module *module)
        if (module) {
                preempt_disable();
                __this_cpu_inc(module->refptr->incs);
-               trace_module_get(module, _THIS_IP_,
-                                __this_cpu_read(module->refptr->incs));
+               trace_module_get(module, _THIS_IP_);
                preempt_enable();
        }
 }
@@ -480,8 +481,7 @@ static inline int try_module_get(struct module *module)
 
                if (likely(module_is_live(module))) {
                        __this_cpu_inc(module->refptr->incs);
-                       trace_module_get(module, _THIS_IP_,
-                               __this_cpu_read(module->refptr->incs));
+                       trace_module_get(module, _THIS_IP_);
                } else
                        ret = 0;