staging: lustre: obdclass: change object lookup to no wait mode
authorLai Siyao <lai.siyao@intel.com>
Tue, 15 May 2018 02:15:48 +0000 (22:15 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 May 2018 07:31:38 +0000 (09:31 +0200)
commit9945024e183c19b2487cbbae64898bd9601118f6
tree5335dd753373fe09d77400f4149107eef74c4360
parent2f1b4edb416d198fac2b9dfcaf432c4f9ec39798
staging: lustre: obdclass: change object lookup to no wait mode

Currently we set LU_OBJECT_HEARD_BANSHEE on object when we want
to remove object from cache, but this may lead to deadlock, because
when other process lookup such object, it needs to wait for this
object until release (done at last refcount put), while that process
maybe already hold an LDLM lock.

Now that current code can handle dying object correctly, we can just
return such object in lookup, thus the above deadlock can be avoided.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9049
Reviewed-on: https://review.whamcloud.com/26965
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Cliff White <cliff.white@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/lu_object.c