Changeset cd3e6a2 in mainline
- Timestamp:
- 2009-09-01T21:18:23Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0712ff2
- Parents:
- aac12264 (diff), 7a56b1ed (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libblock/libblock.c
raac12264 rcd3e6a2 345 345 link_t *l; 346 346 unsigned long key = boff; 347 int rc = EOK;347 int rc; 348 348 349 349 devcon = devcon_search(dev_handle); … … 355 355 356 356 retry: 357 rc = EOK; 358 b = NULL; 359 357 360 fibril_mutex_lock(&cache->lock); 358 361 l = hash_table_find(&cache->block_hash, &key); … … 394 397 unsigned long temp_key; 395 398 recycle: 396 assert(!list_empty(&cache->free_head)); 399 if (list_empty(&cache->free_head)) { 400 fibril_mutex_unlock(&cache->lock); 401 rc = ENOMEM; 402 goto out; 403 } 397 404 l = cache->free_head.next; 398 405 b = list_get_instance(l, block_t, free_link); … … 477 484 478 485 fibril_mutex_unlock(&b->lock); 486 } 487 out: 488 if ((rc != EOK) && b) { 489 assert(b->toxic); 490 (void) block_put(b); 491 b = NULL; 479 492 } 480 493 *block = b;
Note:
See TracChangeset
for help on using the changeset viewer.