Whamcloud - gitweb
- lmv_set_mdc_active() should skip NULL exports
authoralex <alex>
Wed, 16 Jun 2004 14:16:30 +0000 (14:16 +0000)
committeralex <alex>
Wed, 16 Jun 2004 14:16:30 +0000 (14:16 +0000)
  actually, such an export could be connection back to owner mds

lustre/lmv/lmv_obd.c

index 3fe8196..68d36f9 100644 (file)
@@ -68,6 +68,9 @@ static int lmv_set_mdc_active(struct lmv_obd *lmv, struct obd_uuid *uuid,
 
         spin_lock(&lmv->lmv_lock);
         for (i = 0, tgt = lmv->tgts; i < lmv->desc.ld_tgt_count; i++, tgt++) {
+                if (tgt->ltd_exp == NULL)
+                        continue;
+
                 CDEBUG(D_INFO, "lmv idx %d is %s conn "LPX64"\n",
                        i, tgt->uuid.uuid, tgt->ltd_exp->exp_handle.h_cookie);
                 if (strncmp(uuid->uuid, tgt->uuid.uuid, sizeof uuid->uuid) == 0)