From 7eef7d96bd0c4463ab4e90657d9e2bf706995c05 Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Wed, 15 Feb 2012 13:41:03 -0500 Subject: [PATCH] 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 --- lustre/obdclass/lu_object.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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; } /** -- 1.8.3.1