• Patrick Mochel's avatar
    [kobject] Remove kobj_lock and use lockless refcounting. · 29b9acf6
    Patrick Mochel authored
    The only thing preventing this from happening earlier was the circular sysfs
    registration dependency - it would need to be initialized before it was 
    registered, but needed to be registered before it was initialized. 
    
    With kobjects gone from struct filesystem_type, the dependency no longer 
    exists and we don't have to special-case the possibility that a kobject will
    be passed to kobject_get with a refcount == 0. 
    
    Note that a kobject with a count of 0 in that function is still a bug, but 
    one in the subsystem making the call. We should add a debugging hook to dump
    the stack if it does happen. 
    29b9acf6
kobject.c 11.6 KB