Changes in uspace/lib/block/libblock.c [956d4df8:96b02eb9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/block/libblock.c
r956d4df8 r96b02eb9 44 44 #include <sys/mman.h> 45 45 #include <async.h> 46 #include <ipc/ipc.h> 46 47 #include <as.h> 47 48 #include <assert.h> … … 176 177 if (rc != EOK) { 177 178 munmap(comm_area, comm_size); 178 async_hangup(dev_phone);179 ipc_hangup(dev_phone); 179 180 return rc; 180 181 } … … 182 183 if (get_block_size(dev_phone, &bsize) != EOK) { 183 184 munmap(comm_area, comm_size); 184 async_hangup(dev_phone);185 ipc_hangup(dev_phone); 185 186 return rc; 186 187 } … … 189 190 if (rc != EOK) { 190 191 munmap(comm_area, comm_size); 191 async_hangup(dev_phone);192 ipc_hangup(dev_phone); 192 193 return rc; 193 194 } … … 210 211 211 212 munmap(devcon->comm_area, devcon->comm_size); 212 async_hangup(devcon->dev_phone);213 ipc_hangup(devcon->dev_phone); 213 214 214 215 free(devcon); … … 294 295 295 296 /* Allow 1:1 or small-to-large block size translation */ 296 if (cache->lblock_size % devcon->pblock_size != 0) { 297 free(cache); 297 if (cache->lblock_size % devcon->pblock_size != 0) 298 298 return ENOTSUP; 299 }300 299 301 300 cache->blocks_cluster = cache->lblock_size / devcon->pblock_size; … … 438 437 if (!b->data) { 439 438 free(b); 440 b = NULL;441 439 goto recycle; 442 440 } … … 566 564 assert(devcon); 567 565 assert(devcon->cache); 568 assert(block->refcnt >= 1);569 566 570 567 cache = devcon->cache; … … 626 623 unsigned long key = block->lba; 627 624 hash_table_remove(&cache->block_hash, &key, 1); 628 f ibril_mutex_unlock(&block->lock);625 free(block); 629 626 free(block->data); 630 free(block);631 627 cache->blocks_cached--; 632 628 fibril_mutex_unlock(&cache->lock);
Note:
See TracChangeset
for help on using the changeset viewer.