@@ -88,7 +88,6 @@ struct osc_async_page {
struct brw_page oap_brw_page;
struct ptlrpc_request *oap_request;
- struct client_obd *oap_cli;
struct osc_object *oap_obj;
spinlock_t oap_lock;
@@ -2314,7 +2314,6 @@ int __osc_io_unplug(const struct lu_env *env, struct client_obd *cli,
int osc_prep_async_page(struct osc_object *osc, struct osc_page *ops,
struct cl_page *page, loff_t offset)
{
- struct obd_export *exp = osc_export(osc);
struct osc_async_page *oap = &ops->ops_oap;
struct page *vmpage = page->cp_vmpage;
@@ -2322,7 +2321,6 @@ int osc_prep_async_page(struct osc_object *osc, struct osc_page *ops,
return -EIO;
oap->oap_magic = OAP_MAGIC;
- oap->oap_cli = &exp->exp_obd->u.cli;
oap->oap_obj = osc;
oap->oap_page = vmpage;
@@ -2353,9 +2351,9 @@ int osc_queue_async_io(const struct lu_env *env, struct cl_io *io,
struct osc_io *oio = osc_env_io(env);
struct osc_extent *ext = NULL;
struct osc_async_page *oap = &ops->ops_oap;
- struct client_obd *cli = oap->oap_cli;
struct osc_object *osc = oap->oap_obj;
- struct pagevec *pvec = &osc_env_info(env)->oti_pagevec;
+ struct client_obd *cli = osc_cli(osc);
+ struct pagevec *pvec = &osc_env_info(env)->oti_pagevec;
pgoff_t index;
unsigned int grants = 0, tmp;
int brw_flags = OBD_BRW_ASYNC;
@@ -142,7 +142,7 @@ static int osc_page_print(const struct lu_env *env,
/* 2 */
oap->oap_obj_off, oap->oap_page_off, oap->oap_count,
oap->oap_async_flags, oap->oap_brw_flags,
- oap->oap_request, oap->oap_cli, obj,
+ oap->oap_request, cli, obj,
/* 3 */
opg->ops_transfer_pinned,
osc_submit_duration(opg), opg->ops_srvlock,