Whamcloud - gitweb
add lock on son while doing error handling
authorhuanghua <huanghua>
Wed, 18 Oct 2006 06:18:06 +0000 (06:18 +0000)
committerhuanghua <huanghua>
Wed, 18 Oct 2006 06:18:06 +0000 (06:18 +0000)
lustre/mdd/mdd_handler.c

index 0f1b941..81f39e8 100644 (file)
@@ -2606,8 +2606,11 @@ cleanup:
                                 CERROR("error can not cleanup destroy %d\n",
                                        rc2);
                 }
-                if (rc2 == 0)
+                if (rc2 == 0) {
+                        mdd_write_lock(env, son);
                         __mdd_ref_del(env, son, handle);
+                        mdd_write_unlock(env, son);
+                }
         }
         /* finish mdd_lov_create() stuff */
         mdd_lov_create_finish(env, mdd, rc);