Whamcloud - gitweb
LU-7759 llite: handle inactive OSTs better in statfs
[fs/lustre-release.git] / lustre / lov / lov_request.c
index a96bfbb..dc03ce6 100644 (file)
@@ -361,19 +361,20 @@ int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo,
                        continue;
                }
 
+               /* skip targets that have been explicitely disabled by the
+                * administrator */
+               if (!lov->lov_tgts[i]->ltd_exp) {
+                       CDEBUG(D_HA, "lov idx %d administratively disabled\n",
+                              i);
+                       continue;
+               }
+
                if (!lov->lov_tgts[i]->ltd_active)
                        lov_check_and_wait_active(lov, i);
 
-                /* skip targets that have been explicitely disabled by the
-                 * administrator */
-                if (!lov->lov_tgts[i]->ltd_exp) {
-                        CDEBUG(D_HA, "lov idx %d administratively disabled\n", i);
-                        continue;
-                }
-
-                OBD_ALLOC(req, sizeof(*req));
-                if (req == NULL)
-                        GOTO(out_set, rc = -ENOMEM);
+               OBD_ALLOC(req, sizeof(*req));
+               if (req == NULL)
+                       GOTO(out_set, rc = -ENOMEM);
 
                 OBD_ALLOC(req->rq_oi.oi_osfs, sizeof(*req->rq_oi.oi_osfs));
                 if (req->rq_oi.oi_osfs == NULL) {