Whamcloud - gitweb
LU-82 Remove useless clio locks
[fs/lustre-release.git] / lustre / lov / lovsub_lock.c
index f7d54ba..4810da4 100644 (file)
@@ -301,9 +301,7 @@ static int lovsub_lock_delete_one(const struct lu_env *env,
 
         result = 0;
         switch (parent->cll_state) {
 
         result = 0;
         switch (parent->cll_state) {
-        case CLS_NEW:
         case CLS_QUEUING:
         case CLS_QUEUING:
-        case CLS_ENQUEUED:
         case CLS_FREEING:
                 cl_lock_signal(env, parent);
                 break;
         case CLS_FREEING:
                 cl_lock_signal(env, parent);
                 break;
@@ -337,6 +335,8 @@ static int lovsub_lock_delete_one(const struct lu_env *env,
                  * enqueues missing sub-lock.
                  */
                 cl_lock_state_set(env, parent, CLS_NEW);
                  * enqueues missing sub-lock.
                  */
                 cl_lock_state_set(env, parent, CLS_NEW);
+                /* fall through */
+        case CLS_NEW:
                 /*
                  * if last sub-lock is canceled, destroy the top-lock (which
                  * is now `empty') proactively.
                 /*
                  * if last sub-lock is canceled, destroy the top-lock (which
                  * is now `empty') proactively.
@@ -376,6 +376,7 @@ static int lovsub_lock_delete_one(const struct lu_env *env,
                         }
                 }
                 break;
                         }
                 }
                 break;
+        case CLS_ENQUEUED:
         case CLS_HELD:
                 CL_LOCK_DEBUG(D_ERROR, env, parent, "Delete CLS_HELD lock\n");
         default:
         case CLS_HELD:
                 CL_LOCK_DEBUG(D_ERROR, env, parent, "Delete CLS_HELD lock\n");
         default: