From: Timothy Day Date: Tue, 13 Aug 2024 02:22:49 +0000 (-0400) Subject: LU-18136 quota: remove LDLM_LOCK_* macros X-Git-Tag: 2.15.90~27 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=a543e7384ee34087b4eff4f7406691ca2c048fb8;p=fs%2Flustre-release.git LU-18136 quota: 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: I19622b133d95e619d5bd5a12189cc5eb3d2d928f Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56011 Reviewed-by: Andreas Dilger Reviewed-by: Patrick Farrell Reviewed-by: jsimmons Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/quota/qmt_handler.c b/lustre/quota/qmt_handler.c index cdfb742..079b1d5 100644 --- a/lustre/quota/qmt_handler.c +++ b/lustre/quota/qmt_handler.c @@ -1262,7 +1262,7 @@ static int qmt_dqacq(const struct lu_env *env, struct lu_device *ld, lock = ldlm_handle2lock(&qbody->qb_glb_lockh); if (lock == NULL) RETURN(-ENOLCK); - LDLM_LOCK_PUT(lock); + ldlm_lock_put(lock); uuid = &req->rq_export->exp_client_uuid; stype = qmt_uuid2idx(uuid, &idx); @@ -1293,7 +1293,7 @@ static int qmt_dqacq(const struct lu_env *env, struct lu_device *ld, if (!obd_uuid_equals(&lock->l_export->exp_client_uuid, uuid)) { /* sorry, no way to cheat ... */ - LDLM_LOCK_PUT(lock); + ldlm_lock_put(lock); RETURN(-ENOLCK); } @@ -1310,7 +1310,7 @@ static int qmt_dqacq(const struct lu_env *env, struct lu_device *ld, /* lock is being cancelled, prolong timeout */ ldlm_refresh_waiting_lock(lock, timeout); } - LDLM_LOCK_PUT(lock); + ldlm_lock_put(lock); } /* extract quota information from global index FID packed in the diff --git a/lustre/quota/qmt_lock.c b/lustre/quota/qmt_lock.c index a86dce5..8d708a6 100644 --- a/lustre/quota/qmt_lock.c +++ b/lustre/quota/qmt_lock.c @@ -106,7 +106,7 @@ int qmt_intent_policy(const struct lu_env *env, struct lu_device *ld, lock = ldlm_handle2lock(&reqbody->qb_glb_lockh); if (lock == NULL) GOTO(out, rc = -ENOLCK); - LDLM_LOCK_PUT(lock); + ldlm_lock_put(lock); stype = qmt_uuid2idx(uuid, &idx); if (stype < 0) @@ -590,7 +590,7 @@ static void qmt_free_lock_array(struct qmt_gl_lock_array *array) for (i = 0; i < array->q_cnt; i++) { LASSERT(array->q_locks[i]); - LDLM_LOCK_RELEASE(array->q_locks[i]); + ldlm_lock_put(array->q_locks[i]); array->q_locks[i] = NULL; } array->q_cnt = 0; @@ -631,7 +631,7 @@ again: count++; if (array->q_max != 0 && array->q_cnt < array->q_max) { - array->q_locks[array->q_cnt] = LDLM_LOCK_GET(lock); + array->q_locks[array->q_cnt] = ldlm_lock_get(lock); array->q_cnt++; } } @@ -805,7 +805,7 @@ static int qmt_glimpse_lock(const struct lu_env *env, struct qmt_device *qmt, CERROR("%s: failed to notify %s of new quota settings\n", qmt->qmt_svname, obd_uuid2str(&work->gl_lock->l_export->exp_client_uuid)); - LDLM_LOCK_RELEASE(work->gl_lock); + ldlm_lock_put(work->gl_lock); OBD_FREE_PTR(work); } out: diff --git a/lustre/quota/qsd_handler.c b/lustre/quota/qsd_handler.c index 639ae59..6388ecf 100644 --- a/lustre/quota/qsd_handler.c +++ b/lustre/quota/qsd_handler.c @@ -137,7 +137,7 @@ static int qsd_ready(struct lquota_entry *lqe, struct lustre_handle *lockh) /* return remote lock handle to be packed in quota request */ lustre_handle_copy(lockh, &lock->l_remote_handle); - LDLM_LOCK_PUT(lock); + ldlm_lock_put(lock); RETURN(0); } diff --git a/lustre/quota/qsd_lock.c b/lustre/quota/qsd_lock.c index 093fe0c..ef4067a 100644 --- a/lustre/quota/qsd_lock.c +++ b/lustre/quota/qsd_lock.c @@ -555,7 +555,7 @@ int qsd_id_lock_match(struct lustre_handle *lockh, struct lustre_handle *rlockh) lock = ldlm_handle2lock(lockh); LASSERT(lock != NULL); lustre_handle_copy(rlockh, &lock->l_remote_handle); - LDLM_LOCK_PUT(lock); + ldlm_lock_put(lock); RETURN(0); }