From cdd0a509ab06495755bdce440ea4e5f308e55252 Mon Sep 17 00:00:00 2001 From: Timothy Day Date: Mon, 12 Aug 2024 22:23:43 -0400 Subject: [PATCH] LU-18136 ofd: remove LDLM_LOCK_* macros These macros are simply duplicates of the corresponding ldlm_lock_* functions. The patch has been generated with the coccinelle script below. @@ expression x; @@ - LDLM_LOCK_PUT(x) + ldlm_lock_put(x) @@ expression x; @@ - LDLM_LOCK_RELEASE(x) + ldlm_lock_put(x) @@ expression x; @@ - LDLM_LOCK_GET(x) + ldlm_lock_get(x) Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: I8b7052f5bca3e887a4f8488ee382be7221230b05 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56012 Reviewed-by: Andreas Dilger Reviewed-by: Patrick Farrell Reviewed-by: jsimmons Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lustre/ofd/ofd_dev.c | 4 ++-- lustre/ofd/ofd_dlm.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lustre/ofd/ofd_dev.c b/lustre/ofd/ofd_dev.c index a1bed17..b8a43ac 100644 --- a/lustre/ofd/ofd_dev.c +++ b/lustre/ofd/ofd_dev.c @@ -2478,14 +2478,14 @@ static void ofd_prolong_extent_locks(struct tgt_session_info *tsi, /* bingo */ LASSERT(lock->l_export == data->lpa_export); ldlm_lock_prolong_one(lock, data); - LDLM_LOCK_PUT(lock); + ldlm_lock_put(lock); if (data->lpa_locks_cnt > 0) RETURN_EXIT; /* The lock was destroyed probably lets try * resource tree. */ } else { lock->l_last_used = ktime_get(); - LDLM_LOCK_PUT(lock); + ldlm_lock_put(lock); } } } diff --git a/lustre/ofd/ofd_dlm.c b/lustre/ofd/ofd_dlm.c index 145fe78..f790bc4 100644 --- a/lustre/ofd/ofd_dlm.c +++ b/lustre/ofd/ofd_dlm.c @@ -155,7 +155,7 @@ static bool ofd_intent_cb(struct ldlm_lock *lock, struct ofd_intent_args *arg) } /* Populate the gl_work structure. */ - gl_work->gl_lock = LDLM_LOCK_GET(lock); + gl_work->gl_lock = ldlm_lock_get(lock); list_add_tail(&gl_work->gl_list, &arg->gl_list); /* There is actually no need for a glimpse descriptor when glimpsing * extent locks @@ -345,7 +345,7 @@ out: * must clean up. Usually due to a race with unlink.*/ list_for_each_entry_safe(pos, tmp, &arg.gl_list, gl_list) { list_del(&pos->gl_list); - LDLM_LOCK_RELEASE(pos->gl_lock); + ldlm_lock_put(pos->gl_lock); OBD_SLAB_FREE_PTR(pos, ldlm_glimpse_work_kmem); } -- 1.8.3.1