Fix ldlm_resource_complain to lock resource before calling
ldlm_resource_dump
Change-Id: I9dfbe84bd63de3093c99e7379daeca30d02fc875
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/5254
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
{
struct ldlm_resource *res = cfs_hash_object(hs, hnode);
{
struct ldlm_resource *res = cfs_hash_object(hs, hnode);
CERROR("Namespace %s resource refcount nonzero "
"(%d) after lock cleanup; forcing "
"cleanup.\n",
CERROR("Namespace %s resource refcount nonzero "
"(%d) after lock cleanup; forcing "
"cleanup.\n",
cfs_atomic_read(&res->lr_refcount) - 1);
ldlm_resource_dump(D_ERROR, res);
cfs_atomic_read(&res->lr_refcount) - 1);
ldlm_resource_dump(D_ERROR, res);