Whamcloud - gitweb
LU-16518 lu: remove unused functions in lu_object.h 14/58414/2
authorTimothy Day <timday@amazon.com>
Sat, 15 Mar 2025 05:28:53 +0000 (01:28 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 26 Mar 2025 04:04:41 +0000 (04:04 +0000)
Remove lu_object_ops() and lu_object_assert_not_exists()
since they have no callers. Replace lu_object_assert_exists()
with lu_object_exists(), since it's just a thin wrapper.

Fixes: d2d56f38da01 ("- make HEAD from b_post_cmd3")
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I74136a0c5283beaf77fdbc6df19387209e1c03f4
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58414
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lu_object.h
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_xattr.c

index fb984d1..8f12af7 100644 (file)
@@ -704,13 +704,6 @@ static inline const struct lu_fid *lu_object_fid(const struct lu_object *o)
        return &o->lo_header->loh_fid;
 }
 
-/* return device operations vector for this object */
-static inline const struct lu_device_operations *
-lu_object_ops(const struct lu_object *o)
-{
-       return o->lo_dev->ld_ops;
-}
-
 /*
  * Given a compound object, find its slice, corresponding to the device type
  */
@@ -783,16 +776,6 @@ static inline void lu_object_clear_agent_entry(struct lu_object *o)
        o->lo_header->loh_attr &= ~LOHA_HAS_AGENT_ENTRY;
 }
 
-static inline int lu_object_assert_exists(const struct lu_object *o)
-{
-       return lu_object_exists(o);
-}
-
-static inline int lu_object_assert_not_exists(const struct lu_object *o)
-{
-       return !lu_object_exists(o);
-}
-
 /*
  * Attr of this object.
  */
index b8b3af0..7f80e86 100644 (file)
@@ -1668,7 +1668,7 @@ static int mdt_getattr(struct tgt_session_info *tsi)
 
        reqbody = req_capsule_client_get(pill, &RMF_MDT_BODY);
        LASSERT(reqbody);
-       LASSERT(lu_object_assert_exists(&obj->mot_obj));
+       LASSERT(lu_object_exists(&obj->mot_obj));
 
        /* Special case for Data-on-MDT files to get data version */
        if (unlikely(reqbody->mbo_valid & OBD_MD_FLDATAVERSION)) {
index 6f01bed..862d039 100644 (file)
@@ -230,7 +230,7 @@ int mdt_getxattr(struct mdt_thread_info *info)
        ENTRY;
 
        LASSERT(info->mti_object != NULL);
-       LASSERT(lu_object_assert_exists(&info->mti_object->mot_obj));
+       LASSERT(lu_object_exists(&info->mti_object->mot_obj));
 
        CDEBUG(D_INODE, "getxattr "DFID"\n", PFID(&info->mti_body->mbo_fid1));