Whamcloud - gitweb
LU-16565 quota: Remove ldlm is,set,clear macros 43/57543/2
authorTimothy Day <timday@amazon.com>
Fri, 20 Dec 2024 04:13:09 +0000 (23:13 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 13 Mar 2025 17:06:51 +0000 (17:06 +0000)
Replaces ldlm_{is,set,clear} macros with the direct flag
names.

The patch has been generated with the coccinelle script in
contrib/cocci/ldlm_flags.cocci.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I364cb11cbbfc00f133e1193204a920233b3a1b37
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57543
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/quota/qmt_handler.c
lustre/quota/qsd_lock.c

index 07bea44..18f59b3 100644 (file)
@@ -1282,7 +1282,7 @@ static int qmt_dqacq(const struct lu_env *env, struct lu_device *ld,
                        RETURN(-ENOLCK);
                }
 
-               if (ldlm_is_ast_sent(lock)) {
+               if ((lock->l_flags & LDLM_FL_AST_SENT)) {
                        struct ptlrpc_service_part *svc;
                        timeout_t timeout;
 
index 55ee238..4fbd136 100644 (file)
@@ -203,7 +203,7 @@ static int qsd_glb_blocking_ast(struct ldlm_lock *lock,
                 * it's just local cancel (for stack clean up or eviction),
                 * don't re-trigger the reintegration.
                 */
-               if (!ldlm_is_local_only(lock))
+               if (!(lock->l_flags & LDLM_FL_LOCAL_ONLY))
                        qsd_start_reint_thread(qqi);
 
                qqi_putref(qqi);
@@ -380,7 +380,7 @@ static int qsd_id_blocking_ast(struct ldlm_lock *lock,
                 * don't release quota space for local cancel (stack clean
                 * up or eviction)
                 */
-               if (!ldlm_is_local_only(lock)) {
+               if (!(lock->l_flags & LDLM_FL_LOCAL_ONLY)) {
                        /* allocate environment */
                        OBD_ALLOC_PTR(env);
                        if (!env) {