Whamcloud - gitweb
LU-18136 llite: remove LDLM_LOCK_* macros 09/56009/2
authorTimothy Day <timday@amazon.com>
Tue, 13 Aug 2024 02:21:10 +0000 (22:21 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Aug 2024 22:05:30 +0000 (22:05 +0000)
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 <timday@amazon.com>
Change-Id: I64df3f044f1946a6b0d91dd1f4c24cef8751b05b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56009
Reviewed-by: Patrick Farrell <patrick.farrell@oracle.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/file.c
lustre/llite/llite_lib.c

index 3e97ed9..7ede81f 100644 (file)
@@ -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. */
index 061cb76..e6e2851 100644 (file)
@@ -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)