Skip to content
Snippets Groups Projects
Commit 8367f0cf authored by Howard Chu's avatar Howard Chu
Browse files

revert prev commit, no gain

parent ddc5c9f7
No related branches found
No related tags found
No related merge requests found
......@@ -843,7 +843,7 @@ load1:
bdb_cache_entryinfo_unlock( *eip );
islocked = 0;
}
rc = bdb_cache_entry_db_lock( bdb, locker, *eip, 0, 0, lock );
rc = bdb_cache_entry_db_lock( bdb, locker, *eip, load, 0, lock );
if ( (*eip)->bei_state & CACHE_ENTRY_DELETED ) {
rc = DB_NOTFOUND;
bdb_cache_entry_db_unlock( bdb, lock );
......@@ -864,7 +864,11 @@ load1:
ep = NULL;
bdb_cache_lru_link( bdb, *eip );
}
if ( rc ) {
if ( rc == 0 ) {
/* If we succeeded, downgrade back to a readlock. */
rc = bdb_cache_entry_db_relock( bdb, locker,
*eip, 0, 0, lock );
} else {
/* Otherwise, release the lock. */
bdb_cache_entry_db_unlock( bdb, lock );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment