Lines Matching refs:lkb
146 available for the application to use. The lkb still exists until
153 not related to the lifetime of the lkb struct which is managed
172 /* we could possibly check if the cancel of an orphan has resulted in the lkb
173 being removed and then remove that lkb from the orphans list and free it */
175 void dlm_user_add_ast(struct dlm_lkb *lkb, uint32_t flags, int mode,
183 if (lkb->lkb_flags & (DLM_IFL_ORPHAN | DLM_IFL_DEAD))
186 ls = lkb->lkb_resource->res_ls;
191 lkb->ua so we can't try to use it. This second check is necessary
195 if (lkb->lkb_flags & (DLM_IFL_ORPHAN | DLM_IFL_DEAD))
198 DLM_ASSERT(lkb->lkb_ua, dlm_print_lkb(lkb););
199 ua = lkb->lkb_ua;
206 lkb->lkb_flags |= DLM_IFL_ENDOFLIFE;
210 rv = dlm_add_lkb_callback(lkb, flags, mode, status, sbflags, seq);
216 if (list_empty(&lkb->lkb_cb_list)) {
217 kref_get(&lkb->lkb_ref);
218 list_add_tail(&lkb->lkb_cb_list, &proc->asts);
223 if (lkb->lkb_flags & DLM_IFL_ENDOFLIFE) {
226 if (!list_empty(&lkb->lkb_ownqueue)) {
227 list_del_init(&lkb->lkb_ownqueue);
228 dlm_put_lkb(lkb);
670 /* at this point no more lkb's should exist for this lockspace,
672 looking for lkb->ua->proc */
780 struct dlm_lkb *lkb;
839 lkb = list_entry(proc->asts.next, struct dlm_lkb, lkb_cb_list);
842 old_mode = lkb->lkb_last_cast.mode;
844 rv = dlm_rem_lkb_callback(lkb->lkb_resource->res_ls, lkb, &cb, &resid);
846 /* this shouldn't happen; lkb should have been removed from
848 log_print("dlm_rem_lkb_callback empty %x", lkb->lkb_id);
849 list_del_init(&lkb->lkb_cb_list);
851 /* removes ref for proc->asts, may cause lkb to be freed */
852 dlm_put_lkb(lkb);
856 list_del_init(&lkb->lkb_cb_list);
860 /* removes ref for proc->asts, may cause lkb to be freed */
862 dlm_put_lkb(lkb);
869 if (!cb.sb_status && lkb->lkb_lksb->sb_lvbptr &&
873 lkb->lkb_lksb->sb_status = cb.sb_status;
874 lkb->lkb_lksb->sb_flags = cb.sb_flags;
877 rv = copy_result_to_user(lkb->lkb_ua,
881 /* removes ref for proc->asts, may cause lkb to be freed */
883 dlm_put_lkb(lkb);