From: Oleg Drokin Date: Wed, 15 Feb 2012 18:41:03 +0000 (-0500) Subject: Revert "LU-1013 obdclass: lu_object_find miss to unlink object from LRU" X-Git-Tag: 2.1.56~18 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=7eef7d96bd0c4463ab4e90657d9e2bf706995c05 Revert "LU-1013 obdclass: lu_object_find miss to unlink object from LRU" Reverting because in fact it overlaps with LU-1017 This reverts commit b9ccecd1453c5c76fe135048c39f149c241650c6. Signed-off-by: Oleg Drokin --- diff --git a/lustre/obdclass/lu_object.c b/lustre/obdclass/lu_object.c index 6057254..7d274d4 100644 --- a/lustre/obdclass/lu_object.c +++ b/lustre/obdclass/lu_object.c @@ -618,7 +618,7 @@ static struct lu_object *lu_object_find_try(const struct lu_env *env, cfs_hash_bd_lock(hs, &bd, 1); shadow = htable_lookup(s, &bd, f, waiter, &version); - if (shadow == NULL) { + if (likely(shadow == NULL)) { struct lu_site_bkt_data *bkt; bkt = cfs_hash_bd_extra_get(hs, &bd); @@ -626,14 +626,12 @@ static struct lu_object *lu_object_find_try(const struct lu_env *env, bkt->lsb_busy++; cfs_hash_bd_unlock(hs, &bd, 1); return o; - } else { - if (!cfs_list_empty(&shadow->lo_header->loh_lru)) - cfs_list_del_init(&shadow->lo_header->loh_lru); - lprocfs_counter_incr(s->ls_stats, LU_SS_CACHE_RACE); - cfs_hash_bd_unlock(hs, &bd, 1); - lu_object_free(env, o); - return shadow; } + + lprocfs_counter_incr(s->ls_stats, LU_SS_CACHE_RACE); + cfs_hash_bd_unlock(hs, &bd, 1); + lu_object_free(env, o); + return shadow; } /**