From 50178dc643a8158a641f6117510a805dae7b301b Mon Sep 17 00:00:00 2001
From: Lai Siyao <lai.siyao@intel.com>
Date: Wed, 4 Dec 2013 14:48:29 +0800
Subject: [PATCH] LU-4309 debug: debug mds_intent_policy assert

This is a debug patch to dump request before
mds_intent_policy() to assert on NULL lock.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
---
 lustre/mds/handler.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c
index 9edeafc..afc431b 100644
--- a/lustre/mds/handler.c
+++ b/lustre/mds/handler.c
@@ -2509,6 +2509,8 @@ static int mds_intent_policy(struct ldlm_namespace *ns,
         if (new_lock == NULL && (flags & LDLM_FL_INTENT_ONLY))
                 RETURN(0);
 
+        if (new_lock == NULL)
+                DEBUG_REQ(D_ERROR, req, "ASSERT on");
         LASSERTF(new_lock != NULL, "op "LPX64" lockh "LPX64"\n",
                  it->opc, lockh.cookie);
 
-- 
1.5.3.1