Changeset 4f690cd in mainline


Ignore:
Timestamp:
2009-09-01T21:08:52Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7a56b1ed
Parents:
b7b3fda
Message:

Instead of returning toxic blocks to the caller, block_get() should call
block_put() itself.

File:
1 edited

Legend:

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

    rb7b3fda r4f690cd  
    342342retry:
    343343        rc = EOK;
     344        b = NULL;
    344345
    345346        fibril_mutex_lock(&cache->lock);
     
    467468                fibril_mutex_unlock(&b->lock);
    468469        }
     470        if ((rc != EOK) && b) {
     471                assert(b->toxic);
     472                (void) block_put(b);
     473                b = NULL;
     474        }
    469475        *block = b;
    470476        return rc;
Note: See TracChangeset for help on using the changeset viewer.