Whamcloud - gitweb
LU-11675 hsm: don't allow new HSM requests during CDT_INIT
[fs/lustre-release.git] / lustre / mdt / mdt_hsm_cdt_actions.c
index c80fb4b..cd2c247 100644 (file)
@@ -289,12 +289,10 @@ int mdt_agent_record_add(const struct lu_env *env, struct mdt_device *mdt,
        /* in case of cancel request, the cookie is already set to the
         * value of the request cookie to be cancelled
         * so we do not change it */
-       if (hai->hai_action == HSMA_CANCEL) {
+       if (hai->hai_action == HSMA_CANCEL)
                larr->arr_hai.hai_cookie = hai->hai_cookie;
-       } else {
-               cdt->cdt_last_cookie++;
-               larr->arr_hai.hai_cookie = cdt->cdt_last_cookie;
-       }
+       else
+               larr->arr_hai.hai_cookie = cdt->cdt_last_cookie++;
 
        rc = llog_cat_add(env, lctxt->loc_handle, &larr->arr_hdr, NULL);
        if (rc > 0)