Whamcloud - gitweb
Branch b1_6
authoranserper <anserper>
Wed, 13 Feb 2008 21:54:36 +0000 (21:54 +0000)
committeranserper <anserper>
Wed, 13 Feb 2008 21:54:36 +0000 (21:54 +0000)
b=13285
i=johann
i=deen

handle the NULL return case from ptlrpc_prep_req()  (refer to https://bugzilla.lustre.org/attachment.cgi?id=13101&action=edit)

lustre/mdc/mdc_locks.c

index 4ee381c..44af012 100644 (file)
@@ -282,7 +282,9 @@ static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp,
                         /* join is like an unlink of the tail */
                 size[DLM_INTENT_REC_OFF + 3] = sizeof(struct mds_rec_join);
                 req = ldlm_prep_enqueue_req(exp, 7, size, &cancels, count);
-                mdc_join_pack(req, DLM_INTENT_REC_OFF + 3, data, head_size);
+                if (req)
+                        mdc_join_pack(req, DLM_INTENT_REC_OFF + 3, data, 
+                                      head_size);
         } else {
                 req = ldlm_prep_enqueue_req(exp, 6, size, &cancels, count);
                 it->it_flags &= ~O_JOIN_FILE;