Whamcloud - gitweb
LU-14895 client: allow case-insensitive checksum types
[fs/lustre-release.git] / lustre / mdc / mdc_dev.c
index 5ef4480..9767b74 100644 (file)
@@ -1026,7 +1026,11 @@ static int mdc_get_lock_handle(const struct lu_env *env, struct osc_object *osc,
                fid_build_reg_res_name(lu_object_fid(osc2lu(osc)), resname);
                res = ldlm_resource_get(osc_export(osc)->exp_obd->obd_namespace,
                                        NULL, resname, LDLM_IBITS, 0);
-               ldlm_resource_dump(D_ERROR, res);
+               if (IS_ERR(res))
+                       CERROR("No lock resource for "DFID"\n",
+                               PFID(lu_object_fid(osc2lu(osc))));
+               else
+                       ldlm_resource_dump(D_ERROR, res);
                libcfs_debug_dumpstack(NULL);
                return -ENOENT;
        } else {