From: Mr NeilBrown Date: Thu, 22 Aug 2019 05:05:50 +0000 (+1000) Subject: LU-6142 lustre: remove ldt_obd_type field of lu_device_type X-Git-Tag: 2.12.90~172 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=5274e833f5e68d094c2f5f2622994471cca08fb2 LU-6142 lustre: remove ldt_obd_type field of lu_device_type 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 Change-Id: I5530dd92b653b4259ddcbf8dc21af03a79ed255a Reviewed-on: https://review.whamcloud.com/35876 Tested-by: jenkins Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Shaun Tancheff Reviewed-by: Arshad Hussain Tested-by: Maloo --- diff --git a/lustre/include/lu_object.h b/lustre/include/lu_object.h index 0f65f42..6f4c701 100644 --- a/lustre/include/lu_object.h +++ b/lustre/include/lu_object.h @@ -43,6 +43,7 @@ struct seq_file; 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 @@ -320,10 +321,6 @@ struct lu_device_type { */ 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; diff --git a/lustre/obdclass/lu_object.c b/lustre/obdclass/lu_object.c index adf814b..b6279f0 100644 --- a/lustre/obdclass/lu_object.c +++ b/lustre/obdclass/lu_object.c @@ -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; - struct obd_type *type; next = ldt->ldt_ops->ldto_device_free(env, scan); - type = ldt->ldt_obd_type; - if (type != NULL) { - type->typ_refcnt--; - class_put_type(type); - } } }