From 5274e833f5e68d094c2f5f2622994471cca08fb2 Mon Sep 17 00:00:00 2001 From: Mr NeilBrown Date: Thu, 22 Aug 2019 15:05:50 +1000 Subject: [PATCH] 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 --- lustre/include/lu_object.h | 5 +---- lustre/obdclass/lu_object.c | 6 ------ 2 files changed, 1 insertion(+), 10 deletions(-) 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); - } } } -- 1.8.3.1