Ticket #2631: block_cacge.diff

File block_cacge.diff, 805 bytes (added by emitrax, 11 years ago)
  • src/system/kernel/cache/block_cache.cpp

     
    771771    read_only(readOnly),
    772772    deleting(false)
    773773{
    774     mutex_lock(&sCachesLock);
    775     sCaches.Add(this);
    776     mutex_unlock(&sCachesLock);
    777 
    778774    condition_variable.Publish(this, "cache transaction sync");
    779775
    780776    buffer_cache = create_object_cache_etc("block cache buffers", blockSize,
     
    793789        return;
    794790
    795791    mutex_init(&lock, "block cache");
     792    mutex_lock(&sCachesLock);
     793    sCaches.Add(this);
    796794    register_low_resource_handler(&block_cache::LowMemoryHandler, this,
    797795        B_KERNEL_RESOURCE_PAGES | B_KERNEL_RESOURCE_MEMORY, 0);
     796    mutex_unlock(&sCachesLock);
    798797}
    799798
    800799