Merge tag 'net-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev...
[linux-block.git] / fs / dlm / user.c
index 0951ca5754e2a39517776a96a351b9053219f520..d9c09fc0aba11ab5edfe251b1c3b9c8d92b6b200 100644 (file)
@@ -183,7 +183,8 @@ void dlm_user_add_ast(struct dlm_lkb *lkb, uint32_t flags, int mode,
        struct dlm_user_proc *proc;
        int rv;
 
-       if (lkb->lkb_flags & (DLM_IFL_ORPHAN | DLM_IFL_DEAD))
+       if (test_bit(DLM_DFL_ORPHAN_BIT, &lkb->lkb_dflags) ||
+           test_bit(DLM_IFL_DEAD_BIT, &lkb->lkb_iflags))
                return;
 
        ls = lkb->lkb_resource->res_ls;
@@ -195,7 +196,8 @@ void dlm_user_add_ast(struct dlm_lkb *lkb, uint32_t flags, int mode,
           for cases where a completion ast is received for an operation that
           began before clear_proc_locks did its cancel/unlock. */
 
-       if (lkb->lkb_flags & (DLM_IFL_ORPHAN | DLM_IFL_DEAD))
+       if (test_bit(DLM_DFL_ORPHAN_BIT, &lkb->lkb_dflags) ||
+           test_bit(DLM_IFL_DEAD_BIT, &lkb->lkb_iflags))
                goto out;
 
        DLM_ASSERT(lkb->lkb_ua, dlm_print_lkb(lkb););
@@ -206,7 +208,7 @@ void dlm_user_add_ast(struct dlm_lkb *lkb, uint32_t flags, int mode,
                goto out;
 
        if ((flags & DLM_CB_CAST) && lkb_is_endoflife(mode, status))
-               lkb->lkb_flags |= DLM_IFL_ENDOFLIFE;
+               set_bit(DLM_IFL_ENDOFLIFE_BIT, &lkb->lkb_iflags);
 
        spin_lock(&proc->asts_spin);
 
@@ -229,7 +231,7 @@ void dlm_user_add_ast(struct dlm_lkb *lkb, uint32_t flags, int mode,
        }
        spin_unlock(&proc->asts_spin);
 
-       if (lkb->lkb_flags & DLM_IFL_ENDOFLIFE) {
+       if (test_bit(DLM_IFL_ENDOFLIFE_BIT, &lkb->lkb_iflags)) {
                /* N.B. spin_lock locks_spin, not asts_spin */
                spin_lock(&proc->locks_spin);
                if (!list_empty(&lkb->lkb_ownqueue)) {