Whamcloud - gitweb
LU-16518 mgs: remove dt2msg_obj/dev() and friends 53/58553/3
authorTimothy Day <timday@amazon.com>
Thu, 27 Mar 2025 02:29:43 +0000 (22:29 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 16 Apr 2025 20:43:50 +0000 (20:43 +0000)
Several of these helper functions are helping no one.
Let's remove them from the header.

Fixes: ef0b61b01f0f ("LU-1301 mgs: lu device for mgs")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Idf3a5dfa4549f6882e9c195301f58b90f86bee52
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58553
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mgs/mgs_internal.h

index ffe8e8c..6e3b26f 100644 (file)
@@ -314,40 +314,12 @@ static inline struct lu_device *mgs2lu_dev(struct mgs_device *d)
        return (&d->mgs_dt_dev.dd_lu_dev);
 }
 
-static inline struct mgs_device *dt2mgs_dev(struct dt_device *d)
-{
-       LASSERT(lu_device_is_mgs(&d->dd_lu_dev));
-       return container_of(d, struct mgs_device, mgs_dt_dev);
-}
-
 static inline struct mgs_object *lu2mgs_obj(struct lu_object *o)
 {
        LASSERT(ergo(o != NULL, lu_device_is_mgs(o->lo_dev)));
        return container_of_safe(o, struct mgs_object, mgo_obj.do_lu);
 }
 
-static inline struct lu_object *mgs2lu_obj(struct mgs_object *obj)
-{
-       return &obj->mgo_obj.do_lu;
-}
-
-static inline struct mgs_object *mgs_obj(const struct lu_object *o)
-{
-       LASSERT(lu_device_is_mgs(o->lo_dev));
-       return container_of(o, struct mgs_object, mgo_obj.do_lu);
-}
-
-static inline struct mgs_object *dt2mgs_obj(const struct dt_object *d)
-{
-       return mgs_obj(&d->do_lu);
-}
-
-static inline struct dt_object* mgs_object_child(struct mgs_object *o)
-{
-       return container_of(lu_object_next(mgs2lu_obj(o)),
-                           struct dt_object, do_lu);
-}
-
 struct mgs_direntry {
        struct list_head         mde_list;
        char                    *mde_name;