Whamcloud - gitweb
LU-18162 llite: consolidate cl_stack_fini()/lu_stack_fini() 10/58810/5
authorTimothy Day <timday@amazon.com>
Wed, 16 Apr 2025 04:31:46 +0000 (04:31 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 14 May 2025 03:56:02 +0000 (03:56 +0000)
lu_stack_fini() is only called by cl_stack_fini(), which is
simply a thin wrapper around the former. Consolidate these
two functions by deleting cl_stack_fini().

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I42e9b5310c50dc2362fc5ef83b2a10bed09becea
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58810
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
lustre/include/cl_object.h
lustre/llite/vvp_dev.c
lustre/lov/lov_dev.c
lustre/obdclass/cl_object.c
lustre/obdclass/lu_object.c

index ba3cc6b..c672249 100644 (file)
@@ -2056,7 +2056,6 @@ struct cl_site {
 
 int  cl_site_init(struct cl_site *s, struct cl_device *top);
 void cl_site_fini(struct cl_site *s);
-void cl_stack_fini(const struct lu_env *env, struct cl_device *cl);
 
 /**
  * Output client site statistical counters into a buffer. Suitable for
index 186e852..90df045 100644 (file)
@@ -352,7 +352,7 @@ int cl_sb_fini(struct super_block *sb)
                cld = sbi->ll_cl;
 
                if (cld != NULL) {
-                       cl_stack_fini(env, cld);
+                       lu_stack_fini(env, cl2lu_dev(cld));
                        sbi->ll_cl = NULL;
                        sbi->ll_site = NULL;
                }
index 0352ea3..f5cab73 100644 (file)
@@ -204,7 +204,7 @@ static struct lu_device *lov_device_fini(const struct lu_env *env,
                        if (!ld->ld_md_tgts[i].ldm_mdc)
                                continue;
 
-                       cl_stack_fini(env, ld->ld_md_tgts[i].ldm_mdc);
+                       lu_stack_fini(env, cl2lu_dev(ld->ld_md_tgts[i].ldm_mdc));
                        ld->ld_md_tgts[i].ldm_mdc = NULL;
                        ld->ld_lov->lov_mdc_tgts[i].lmtd_mdc = NULL;
                }
@@ -218,7 +218,7 @@ static struct lu_device *lov_device_fini(const struct lu_env *env,
 
                        lsd = ld->ld_target[desc->ltd_index];
                        if (lsd) {
-                               cl_stack_fini(env, lovsub2cl_dev(lsd));
+                               lu_stack_fini(env, lovsub2lu_dev(lsd));
                                ld->ld_target[desc->ltd_index] = NULL;
                        }
                }
@@ -338,7 +338,7 @@ static void lov_cl_del_target(const struct lu_env *env, struct lu_device *dev,
        ENTRY;
 
        if (ld->ld_target[index]) {
-               cl_stack_fini(env, lovsub2cl_dev(ld->ld_target[index]));
+               lu_stack_fini(env, lovsub2lu_dev(ld->ld_target[index]));
                ld->ld_target[index] = NULL;
        }
        EXIT;
index 287fdaa..857c5a7 100644 (file)
@@ -1040,15 +1040,6 @@ struct cl_device *cl_type_setup(const struct lu_env *env, struct lu_site *site,
 }
 EXPORT_SYMBOL(cl_type_setup);
 
-/**
- * Finalize device stack by calling lu_stack_fini().
- */
-void cl_stack_fini(const struct lu_env *env, struct cl_device *cl)
-{
-        lu_stack_fini(env, cl2lu_dev(cl));
-}
-EXPORT_SYMBOL(cl_stack_fini);
-
 static struct lu_context_key cl_key;
 
 struct cl_thread_info *cl_env_info(const struct lu_env *env)
index 032711d..b77dec4 100644 (file)
@@ -1351,6 +1351,7 @@ void lu_stack_fini(const struct lu_env *env, struct lu_device *top)
        for (scan = top; scan != NULL; scan = next)
                next = ldto_device_free(env, scan);
 }
+EXPORT_SYMBOL(lu_stack_fini);
 
 /**
  * Global counter incremented whenever key is registered, unregistered,