Whamcloud - gitweb
some more checks, and some small fix
authorhuanghua <huanghua>
Wed, 20 Sep 2006 09:17:16 +0000 (09:17 +0000)
committerhuanghua <huanghua>
Wed, 20 Sep 2006 09:17:16 +0000 (09:17 +0000)
lustre/ldlm/ldlm_lib.c
lustre/mdt/mdt_handler.c

index 284d1d4..10ad6d2 100644 (file)
@@ -1471,7 +1471,14 @@ int target_handle_ping(struct ptlrpc_request *req)
 
 void target_committed_to_req(struct ptlrpc_request *req)
 {
-        struct obd_device *obd = req->rq_export->exp_obd;
+        struct obd_device *obd;
+        
+        if (req == NULL || req->rq_export == NULL)
+                return; 
+
+        obd = req->rq_export->exp_obd;
+        if (obd == NULL)
+                return;
 
         if (!obd->obd_no_transno && req->rq_repmsg != NULL)
                 lustre_msg_set_last_committed(req->rq_repmsg,
index 0e71bc2..2dd1324 100644 (file)
@@ -1942,7 +1942,7 @@ static int mdt_intent_getattr(enum mdt_it_code opcode,
                               struct ldlm_lock **lockp,
                               int flags)
 {
-        struct mdt_lock_handle  tmp_lock = { { 0 } };
+        struct mdt_lock_handle  tmp_lock = { {0}, };
         struct mdt_lock_handle *lhc = &tmp_lock;
         struct ldlm_lock       *new_lock = NULL;
         __u64                   child_bits;
@@ -3209,8 +3209,7 @@ static int mdt_obd_reconnect(struct obd_export *exp, struct obd_device *obd,
 
 static int mdt_obd_disconnect(struct obd_export *exp)
 {
-        struct mdt_device      *mdt;
-        mdt = mdt_dev(exp->exp_obd->obd_lu_dev);
+        struct mdt_device *mdt = mdt_dev(exp->exp_obd->obd_lu_dev);
         int rc;
         ENTRY;