Whamcloud - gitweb
LU-2492 obdclass: lu_object_find_at() waits forever
authorBobi Jam <bobijam.xu@intel.com>
Sat, 5 Jan 2013 00:52:22 +0000 (08:52 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 8 Jan 2013 05:05:31 +0000 (00:05 -0500)
commit6f34d6b85466bc8cddb8de1816734528af9da09b
tree1dcbea3c10c1acd8d6b5f40df335291329182cd4
parent3c585bf063ccd2505cf60a7b6170d0bd63c9117d
LU-2492 obdclass: lu_object_find_at() waits forever

In htable_lookup(), cfs_hash_bd_lookup_locked() could add an object
refcount and it messes with lu_object_put(), and the object's supposed
last holder will miss the change to free the object, leaving an 0
referred object in the hash table, and keeps lu_object_find_at()
waiting forever.

In this patch, we do not take the refcount of the dying object
in htable_lookup().

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I4bd57e944bf9167d70d97845be55241b538872df
Reviewed-on: http://review.whamcloud.com/3439
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/include/libcfs/libcfs_hash.h
libcfs/libcfs/hash.c
lustre/obdclass/lu_object.c