Whamcloud - gitweb
b=19398
[fs/lustre-release.git] / lustre / lov / lov_object.c
index 8ef1413..b45bf67 100644 (file)
@@ -245,9 +245,11 @@ static void lov_subobject_kill(const struct lu_env *env, struct lov_object *lov,
         cfs_waitlink_t          *waiter;
 
         r0  = &lov->u.raid0;
-        sub = lovsub2cl(los);
         LASSERT(r0->lo_sub[idx] == los);
 
+        sub  = lovsub2cl(los);
+        site = sub->co_lu.lo_dev->ld_site;
+
         cl_object_kill(env, sub);
         /* release a reference to the sub-object and ... */
         lu_object_ref_del(&sub->co_lu, "lov-parent", lov);
@@ -257,7 +259,6 @@ static void lov_subobject_kill(const struct lu_env *env, struct lov_object *lov,
          * ->lo_sub[] slot in lovsub_object_fini() */
         if (r0->lo_sub[idx] == los) {
                 waiter = &lov_env_info(env)->lti_waiter;
-                site   = sub->co_lu.lo_dev->ld_site;
                 cfs_waitlink_init(waiter);
                 cfs_waitq_add(&site->ls_marche_funebre, waiter);
                 set_current_state(CFS_TASK_UNINT);