htable_lookup() could return -EAGAIN for dying object, we should
handle it properly in lu_object_find_try().
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I616928cb983d4f64a64f25b7d296b6c9bd18e4ea
Reviewed-on: http://review.whamcloud.com/2066
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
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);
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);
}
return lu_object_top(h);
}
hs = s->ls_obj_hash;
cfs_hash_bd_get_and_lock(hs, (void *)f, &bd, 1);
o = htable_lookup(s, &bd, f, waiter, &version);
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;
cfs_hash_bd_unlock(hs, &bd, 1);
if (o != NULL)
return o;