Skip to content

Commit

Permalink
Merge branch 'tp/ibm_next_may9' into ibm_next_tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
Venkateswararao Jujjuri committed May 11, 2012
2 parents 0221b36 + 07caae4 commit 4c403c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/Cache_inode/cache_inode_misc.c
Expand Up @@ -404,15 +404,16 @@ cache_inode_new_entry(cache_inode_fsal_data_t *fsdata,

rc = HashTable_SetLatched(fh_to_cache_entry_ht, &key, &value,
&latch, TRUE, NULL, NULL);
/* HashTable_SetLatched release the latch irrespective
* of success/failure. */
latched = FALSE;
if ((rc != HASHTABLE_SUCCESS) && (rc != HASHTABLE_OVERWRITTEN)) {
LogCrit(COMPONENT_CACHE_INODE,
"cache_inode_new_entry: entry could not be added to hash, "
"rc=%d", rc);
*status = CACHE_INODE_HASH_SET_ERROR;
goto out;
}
latched = FALSE;


LogDebug(COMPONENT_CACHE_INODE,
"cache_inode_new_entry: New entry %p added", entry);
Expand Down
5 changes: 3 additions & 2 deletions src/HashTable/HashTable.c
Expand Up @@ -539,8 +539,8 @@ HashTable_DeleteLatched(struct hash_table *ht,
struct hash_data *data = NULL;

if (!latch->locator) {
HashTable_ReleaseLatched(ht,
latch);
HashTable_ReleaseLatched(ht, latch);
return HASHTABLE_SUCCESS;
}

data = RBT_OPAQ(latch->locator);
Expand Down Expand Up @@ -1053,6 +1053,7 @@ HashTable_DelSafe(hash_table_t *ht,
NULL);
} else {
rc = HASHTABLE_ERROR_NO_SUCH_KEY;
HashTable_ReleaseLatched(ht, &latch);
}
break;

Expand Down

0 comments on commit 4c403c0

Please sign in to comment.