Whamcloud - gitweb
LU-6943 clio: get rid of cl_req
[fs/lustre-release.git] / lustre / osc / osc_cache.c
index dd28035..0b01b36 100644 (file)
@@ -1291,14 +1291,6 @@ static int osc_completion(const struct lu_env *env, struct osc_async_page *oap,
                "cp_state:%u, cmd:%d\n", page->cp_state, cmd);
        LASSERT(opg->ops_transfer_pinned);
 
-       /*
-        * page->cp_req can be NULL if io submission failed before
-        * cl_req was allocated.
-        */
-       if (page->cp_req != NULL)
-               cl_req_page_done(env, page);
-       LASSERT(page->cp_req == NULL);
-
        crt = cmd == OBD_BRW_READ ? CRT_READ : CRT_WRITE;
        /* Clear opg->ops_transfer_pinned before VM lock is released. */
        opg->ops_transfer_pinned = 0;
@@ -1326,6 +1318,7 @@ static int osc_completion(const struct lu_env *env, struct osc_async_page *oap,
        lu_ref_del(&page->cp_reference, "transfer", page);
 
        cl_page_completion(env, page, crt, rc);
+       cl_page_put(env, page);
 
        RETURN(0);
 }