Whamcloud - gitweb
LU-6142 lustre: remove ldt_obd_type field of lu_device_type 76/35876/4
authorMr NeilBrown <neilb@suse.com>
Thu, 22 Aug 2019 05:05:50 +0000 (15:05 +1000)
committerOleg Drokin <green@whamcloud.com>
Mon, 16 Sep 2019 23:01:23 +0000 (23:01 +0000)
This field is never set, so it is always NULL.
So remove it,
 and the one place it is used,
 and a variable that now will now never be set.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.com>
Change-Id: I5530dd92b653b4259ddcbf8dc21af03a79ed255a
Reviewed-on: https://review.whamcloud.com/35876
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <stancheff@cray.com>
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/lu_object.h
lustre/obdclass/lu_object.c

index 0f65f42..6f4c701 100644 (file)
@@ -43,6 +43,7 @@ struct seq_file;
 struct proc_dir_entry;
 struct lustre_cfg;
 struct lprocfs_stats;
 struct proc_dir_entry;
 struct lustre_cfg;
 struct lprocfs_stats;
+struct obd_type;
 
 /** \defgroup lu lu
  * lu_* data-types represent server-side entities shared by data and meta-data
 
 /** \defgroup lu lu
  * lu_* data-types represent server-side entities shared by data and meta-data
@@ -320,10 +321,6 @@ struct lu_device_type {
          */
         const struct lu_device_type_operations *ldt_ops;
         /**
          */
         const struct lu_device_type_operations *ldt_ops;
         /**
-         * \todo XXX: temporary pointer to associated obd_type.
-         */
-        struct obd_type                        *ldt_obd_type;
-        /**
          * \todo XXX: temporary: context tags used by obd_*() calls.
          */
         __u32                                   ldt_ctx_tags;
          * \todo XXX: temporary: context tags used by obd_*() calls.
          */
         __u32                                   ldt_ctx_tags;
index adf814b..b6279f0 100644 (file)
@@ -1400,14 +1400,8 @@ void lu_stack_fini(const struct lu_env *env, struct lu_device *top)
 
         for (scan = top; scan != NULL; scan = next) {
                 const struct lu_device_type *ldt = scan->ld_type;
 
         for (scan = top; scan != NULL; scan = next) {
                 const struct lu_device_type *ldt = scan->ld_type;
-                struct obd_type             *type;
 
                 next = ldt->ldt_ops->ldto_device_free(env, scan);
 
                 next = ldt->ldt_ops->ldto_device_free(env, scan);
-                type = ldt->ldt_obd_type;
-                if (type != NULL) {
-                        type->typ_refcnt--;
-                        class_put_type(type);
-                }
         }
 }
 
         }
 }