enum cl_req_type crt, int ioret);
int cl_page_make_ready(const struct lu_env *env, struct cl_page *pg,
enum cl_req_type crt);
-int cl_page_cache_add(const struct lu_env *env, struct cl_io *io,
- struct cl_page *pg, enum cl_req_type crt);
void cl_page_clip(const struct lu_env *env, struct cl_page *pg,
int from, int to);
int cl_page_flush(const struct lu_env *env, struct cl_io *io,
ENTRY;
+ LASSERT(cp->cp_type != CPT_TRANSIENT);
+
cl_page_owner_clear(cp);
state = cp->cp_state;
PINVRNT(env, cp, state == CPS_OWNED || state == CPS_FREEING);
LINVRNT(cl_object_same(pg->cp_obj, top->ci_obj));
ENTRY;
- if (pg->cp_type != CPT_TRANSIENT)
- RETURN(pg->cp_state == CPS_OWNED && pg->cp_owner == top);
- else
- RETURN(pg->cp_owner == top);
+ LASSERT(pg->cp_type != CPT_TRANSIENT);
+ RETURN(pg->cp_state == CPS_OWNED && pg->cp_owner == top);
}
EXPORT_SYMBOL(cl_page_is_owned);
void cl_page_disown(const struct lu_env *env,
struct cl_io *io, struct cl_page *pg)
{
- LASSERT(pg->cp_type != CPT_TRANSIENT);
-
PINVRNT(env, pg, cl_page_is_owned(pg, cl_io_top(io)) ||
pg->cp_state == CPS_FREEING);