From: Timothy Day Date: Tue, 13 Aug 2024 02:21:10 +0000 (-0400) Subject: LU-18136 llite: remove LDLM_LOCK_* macros X-Git-Tag: 2.15.90~29 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=74038a5993107d257282aa2c97908924697bb6f9;p=fs%2Flustre-release.git LU-18136 llite: 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: I64df3f044f1946a6b0d91dd1f4c24cef8751b05b Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56009 Reviewed-by: Patrick Farrell Reviewed-by: Andreas Dilger Reviewed-by: jsimmons Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 3e97ed9..7ede81f 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -1402,7 +1402,7 @@ static int ll_lease_close_intent(struct obd_client_handle *och, lock_res_and_lock(lock); cancelled = ldlm_is_cancel(lock); unlock_res_and_lock(lock); - LDLM_LOCK_PUT(lock); + ldlm_lock_put(lock); } CDEBUG(D_INODE, "lease for "DFID" broken? %d, bias: %x\n", @@ -4721,7 +4721,7 @@ skip_copy: fmode = och->och_flags; unlock_res_and_lock(lock); - LDLM_LOCK_PUT(lock); + ldlm_lock_put(lock); } } mutex_unlock(&lli->lli_och_mutex); @@ -5653,7 +5653,7 @@ int ll_have_md_lock(struct obd_export *exp, struct inode *inode, __u64 *bits, if (lock) { *bits &= ~(lock->l_policy_data.l_inodebits.bits); - LDLM_LOCK_PUT(lock); + ldlm_lock_put(lock); } else { *bits &= ~policy.l_inodebits.bits; } @@ -6564,7 +6564,7 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode, wait_layout = rc == -EBUSY; EXIT; out: - LDLM_LOCK_PUT(lock); + ldlm_lock_put(lock); ldlm_lock_decref(lockh, mode); /* wait for IO to complete if it's still being used. */ diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 061cb76..e6e2851 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -3768,7 +3768,7 @@ int ll_prep_inode(struct inode **inode, struct req_capsule *pill, conf.u.coc_layout = md.layout; (void)ll_layout_conf(*inode, &conf); } - LDLM_LOCK_PUT(lock); + ldlm_lock_put(lock); } if (default_lmv_deleted)