From: Timothy Day Date: Sat, 15 Mar 2025 05:28:53 +0000 (-0400) Subject: LU-16518 lu: remove unused functions in lu_object.h X-Git-Tag: 2.16.54~59 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F14%2F58414%2F2;p=fs%2Flustre-release.git LU-16518 lu: remove unused functions in lu_object.h 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 Change-Id: I74136a0c5283beaf77fdbc6df19387209e1c03f4 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58414 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Arshad Hussain Reviewed-by: Mikhail Pershin Reviewed-by: Oleg Drokin --- diff --git a/lustre/include/lu_object.h b/lustre/include/lu_object.h index fb984d1..8f12af7 100644 --- a/lustre/include/lu_object.h +++ b/lustre/include/lu_object.h @@ -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. */ diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index b8b3af0..7f80e86 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -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)) { diff --git a/lustre/mdt/mdt_xattr.c b/lustre/mdt/mdt_xattr.c index 6f01bed..862d039 100644 --- a/lustre/mdt/mdt_xattr.c +++ b/lustre/mdt/mdt_xattr.c @@ -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));