Whamcloud - gitweb
b=19398
authordeshmukh <deshmukh>
Mon, 22 Jun 2009 18:04:37 +0000 (18:04 +0000)
committerdeshmukh <deshmukh>
Mon, 22 Jun 2009 18:04:37 +0000 (18:04 +0000)
i=tom.wang
i=nathan.rutman
i=jinshan.xiong

Fix for soft lockup - CPU#13 stuck for 10s! [umount:16789]

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;
         cfs_waitlink_t          *waiter;
 
         r0  = &lov->u.raid0;
-        sub = lovsub2cl(los);
         LASSERT(r0->lo_sub[idx] == 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);
         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;
          * ->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);
                 cfs_waitlink_init(waiter);
                 cfs_waitq_add(&site->ls_marche_funebre, waiter);
                 set_current_state(CFS_TASK_UNINT);