diff mbox series

[17/24] lustre: osc: remove oap_cli

Message ID 1663478534-19917-18-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: update to 2.15.52 | expand

Commit Message

James Simmons Sept. 18, 2022, 5:22 a.m. UTC
From: "John L. Hammond" <jhammond@whamcloud.com>

Remove the redundant oap_cli member from struct osc_async_page.

...:(cl_page.c:216:__cl_page_alloc()) slab-alloced 'cl_page': 256 at 000000009ab84b37.

WC-bug-id: https://jira.whamcloud.com/browse/LU-10994
Lustre-commit: 9b4fb6e65414fa75a ("LU-10994 osc: remove oap_cli")
Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/47403
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/include/lustre_osc.h | 1 -
 fs/lustre/osc/osc_cache.c      | 6 ++----
 fs/lustre/osc/osc_page.c       | 2 +-
 3 files changed, 3 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/fs/lustre/include/lustre_osc.h b/fs/lustre/include/lustre_osc.h
index 16d6a8e..d630169 100644
--- a/fs/lustre/include/lustre_osc.h
+++ b/fs/lustre/include/lustre_osc.h
@@ -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;
diff --git a/fs/lustre/osc/osc_cache.c b/fs/lustre/osc/osc_cache.c
index e7b8372..29d13f5 100644
--- a/fs/lustre/osc/osc_cache.c
+++ b/fs/lustre/osc/osc_cache.c
@@ -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;
diff --git a/fs/lustre/osc/osc_page.c b/fs/lustre/osc/osc_page.c
index 7470dee..5300ac9 100644
--- a/fs/lustre/osc/osc_page.c
+++ b/fs/lustre/osc/osc_page.c
@@ -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,