From 69579f4bb08c1cec70ce3de248e848792e3346da Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Wed, 29 May 2024 11:16:52 -0400 Subject: [PATCH] LU-13814 clio: remove cl_page_delete for transient cl_page_delete no longer does anything for transient pages, so do not call it for them. Signed-off-by: Patrick Farrell Change-Id: I666cceaa1f05bf7e86fb60782eb573d5714051ee Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52080 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin Reviewed-by: Qian Yingjin Reviewed-by: Sebastien Buisson --- lustre/obdclass/cl_io.c | 1 - lustre/obdclass/cl_page.c | 11 ++++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lustre/obdclass/cl_io.c b/lustre/obdclass/cl_io.c index 0c409fe..f00699c 100644 --- a/lustre/obdclass/cl_io.c +++ b/lustre/obdclass/cl_io.c @@ -1208,7 +1208,6 @@ static void cl_sub_dio_end(const struct lu_env *env, struct cl_sync_io *anchor) while (sdio->csd_pages.pl_nr > 0) { struct cl_page *page = cl_page_list_first(&sdio->csd_pages); - cl_page_delete(env, page); cl_page_list_del(env, &sdio->csd_pages, page, false); cl_page_put(env, page); } diff --git a/lustre/obdclass/cl_page.c b/lustre/obdclass/cl_page.c index c496b6c..3cc5e0b 100644 --- a/lustre/obdclass/cl_page.c +++ b/lustre/obdclass/cl_page.c @@ -789,15 +789,16 @@ static void __cl_page_delete(const struct lu_env *env, struct cl_page *cp) ENTRY; + if (cp->cp_type == CPT_TRANSIENT) + EXIT; + /* * Severe all ways to obtain new pointers to @pg. * Transient pages already can't be found because they're not in cache. */ - if (cp->cp_type != CPT_TRANSIENT) { - PASSERT(env, cp, cp->cp_state != CPS_FREEING); - cl_page_owner_clear(cp); - __cl_page_state_set(env, cp, CPS_FREEING); - } + PASSERT(env, cp, cp->cp_state != CPS_FREEING); + cl_page_owner_clear(cp); + __cl_page_state_set(env, cp, CPS_FREEING); cl_page_slice_for_each_reverse(cp, slice, i) { if (slice->cpl_ops->cpo_delete != NULL) -- 1.8.3.1