From 39e5535e8840b52d63b61e92cc0bc279b938658f Mon Sep 17 00:00:00 2001 From: johann Date: Wed, 9 Jan 2008 22:57:08 +0000 Subject: [PATCH] Branch b1_6 b=14562 i=adilger i=bowen.zhou Check if lock is NULL in ldlm_bl_to_thread(). Problem introduced by bug 13843. --- lustre/ldlm/ldlm_lockd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 2aa734e..8e57759 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -1410,7 +1410,7 @@ static int ldlm_bl_to_thread(struct ldlm_namespace *ns, blwi->blwi_lock = lock; } spin_lock(&blp->blp_lock); - if (lock->l_flags & LDLM_FL_DISCARD_DATA) { + if (lock && lock->l_flags & LDLM_FL_DISCARD_DATA) { /* add LDLM_FL_DISCARD_DATA requests to the priority list */ list_add_tail(&blwi->blwi_entry, &blp->blp_prio_list); } else { -- 1.8.3.1