Changeset e950803 in mainline for uspace/lib/block/libblock.c


Ignore:
Timestamp:
2011-02-03T20:20:01Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bfe43d5
Parents:
bd81386 (diff), b366a1bc (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:

Merge from lp:~jakub/helenos/fs.

File:
1 edited

Legend:

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

    rbd81386 re950803  
    294294
    295295        /* Allow 1:1 or small-to-large block size translation */
    296         if (cache->lblock_size % devcon->pblock_size != 0)
     296        if (cache->lblock_size % devcon->pblock_size != 0) {
     297                free(cache);
    297298                return ENOTSUP;
     299        }
    298300
    299301        cache->blocks_cluster = cache->lblock_size / devcon->pblock_size;
     
    436438                        if (!b->data) {
    437439                                free(b);
     440                                b = NULL;
    438441                                goto recycle;
    439442                        }
     
    563566        assert(devcon);
    564567        assert(devcon->cache);
     568        assert(block->refcnt >= 1);
    565569
    566570        cache = devcon->cache;
     
    622626                        unsigned long key = block->lba;
    623627                        hash_table_remove(&cache->block_hash, &key, 1);
     628                        free(block->data);
    624629                        free(block);
    625                         free(block->data);
    626630                        cache->blocks_cached--;
    627631                        fibril_mutex_unlock(&cache->lock);
Note: See TracChangeset for help on using the changeset viewer.