Changeset 92574f4 in mainline for uspace/lib/block/libblock.c


Ignore:
Timestamp:
2011-02-24T12:03:27Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e7b7ebd5
Parents:
4837092 (diff), a80849c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merged development (changes in DDF, etc.).

Conflicts in uspace/drv/usbkbd/main.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/block/libblock.c

    r4837092 r92574f4  
    4444#include <sys/mman.h>
    4545#include <async.h>
    46 #include <ipc/ipc.h>
    4746#include <as.h>
    4847#include <assert.h>
     
    177176        if (rc != EOK) {
    178177                munmap(comm_area, comm_size);
    179                 ipc_hangup(dev_phone);
     178                async_hangup(dev_phone);
    180179                return rc;
    181180        }
     
    183182        if (get_block_size(dev_phone, &bsize) != EOK) {
    184183                munmap(comm_area, comm_size);
    185                 ipc_hangup(dev_phone);
     184                async_hangup(dev_phone);
    186185                return rc;
    187186        }
     
    190189        if (rc != EOK) {
    191190                munmap(comm_area, comm_size);
    192                 ipc_hangup(dev_phone);
     191                async_hangup(dev_phone);
    193192                return rc;
    194193        }
     
    211210
    212211        munmap(devcon->comm_area, devcon->comm_size);
    213         ipc_hangup(devcon->dev_phone);
     212        async_hangup(devcon->dev_phone);
    214213
    215214        free(devcon);   
     
    295294
    296295        /* Allow 1:1 or small-to-large block size translation */
    297         if (cache->lblock_size % devcon->pblock_size != 0)
     296        if (cache->lblock_size % devcon->pblock_size != 0) {
     297                free(cache);
    298298                return ENOTSUP;
     299        }
    299300
    300301        cache->blocks_cluster = cache->lblock_size / devcon->pblock_size;
     
    437438                        if (!b->data) {
    438439                                free(b);
     440                                b = NULL;
    439441                                goto recycle;
    440442                        }
     
    564566        assert(devcon);
    565567        assert(devcon->cache);
     568        assert(block->refcnt >= 1);
    566569
    567570        cache = devcon->cache;
     
    623626                        unsigned long key = block->lba;
    624627                        hash_table_remove(&cache->block_hash, &key, 1);
     628                        fibril_mutex_unlock(&block->lock);
     629                        free(block->data);
    625630                        free(block);
    626                         free(block->data);
    627631                        cache->blocks_cached--;
    628632                        fibril_mutex_unlock(&cache->lock);
Note: See TracChangeset for help on using the changeset viewer.