From 4ce426ab33196ff04cc7016a2dc717e53d1b4a75 Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Mon, 30 Jan 2012 22:06:47 -0800 Subject: [PATCH] LU-1017 handle -EAGAIN properly in lu_object_find_try() htable_lookup() could return -EAGAIN for dying object, we should handle it properly in lu_object_find_try(). Signed-off-by: Niu Yawei Change-Id: I616928cb983d4f64a64f25b7d296b6c9bd18e4ea Reviewed-on: http://review.whamcloud.com/2066 Tested-by: Hudson Reviewed-by: Alex Zhuravlev Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/obdclass/lu_object.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lustre/obdclass/lu_object.c b/lustre/obdclass/lu_object.c index 0232cdd..6057254 100644 --- a/lustre/obdclass/lu_object.c +++ b/lustre/obdclass/lu_object.c @@ -504,6 +504,7 @@ static struct lu_object *htable_lookup(struct lu_site *s, h = container_of0(hnode, struct lu_object_header, loh_hash); if (likely(!lu_object_is_dying(h))) { lprocfs_counter_incr(s->ls_stats, LU_SS_CACHE_HIT); + cfs_list_del_init(&h->loh_lru); return lu_object_top(h); } @@ -600,8 +601,6 @@ static struct lu_object *lu_object_find_try(const struct lu_env *env, hs = s->ls_obj_hash; cfs_hash_bd_get_and_lock(hs, (void *)f, &bd, 1); o = htable_lookup(s, &bd, f, waiter, &version); - if (o != NULL && !cfs_list_empty(&o->lo_header->loh_lru)) - cfs_list_del_init(&o->lo_header->loh_lru); cfs_hash_bd_unlock(hs, &bd, 1); if (o != NULL) return o; -- 1.8.3.1