Lines Matching refs:cb
22 struct dlm_callback *cb = container_of(ref, struct dlm_callback, ref); in dlm_release_callback() local
24 dlm_free_cb(cb); in dlm_release_callback()
44 struct dlm_callback *cb; in dlm_enqueue_lkb_callback() local
78 cb = dlm_allocate_cb(); in dlm_enqueue_lkb_callback()
79 if (!cb) { in dlm_enqueue_lkb_callback()
84 cb->flags = flags; in dlm_enqueue_lkb_callback()
85 cb->mode = mode; in dlm_enqueue_lkb_callback()
86 cb->sb_status = status; in dlm_enqueue_lkb_callback()
87 cb->sb_flags = (sbflags & 0x000000FF); in dlm_enqueue_lkb_callback()
88 kref_init(&cb->ref); in dlm_enqueue_lkb_callback()
92 list_add_tail(&cb->list, &lkb->lkb_callbacks); in dlm_enqueue_lkb_callback()
95 dlm_callback_set_last_ptr(&lkb->lkb_last_cast, cb); in dlm_enqueue_lkb_callback()
97 dlm_callback_set_last_ptr(&lkb->lkb_last_cb, cb); in dlm_enqueue_lkb_callback()
103 int dlm_dequeue_lkb_callback(struct dlm_lkb *lkb, struct dlm_callback **cb) in dlm_dequeue_lkb_callback() argument
106 *cb = list_first_entry_or_null(&lkb->lkb_callbacks, in dlm_dequeue_lkb_callback()
108 if (!*cb) in dlm_dequeue_lkb_callback()
112 list_del(&(*cb)->list); in dlm_dequeue_lkb_callback()
162 struct dlm_callback *cb; in dlm_callback_work() local
166 rv = dlm_dequeue_lkb_callback(lkb, &cb); in dlm_callback_work()
178 if (cb->flags & DLM_CB_BAST) { in dlm_callback_work()
179 trace_dlm_bast(ls, lkb, cb->mode); in dlm_callback_work()
181 lkb->lkb_last_bast_mode = cb->mode; in dlm_callback_work()
182 bastfn(lkb->lkb_astparam, cb->mode); in dlm_callback_work()
183 } else if (cb->flags & DLM_CB_CAST) { in dlm_callback_work()
184 lkb->lkb_lksb->sb_status = cb->sb_status; in dlm_callback_work()
185 lkb->lkb_lksb->sb_flags = cb->sb_flags; in dlm_callback_work()
191 kref_put(&cb->ref, dlm_release_callback); in dlm_callback_work()
194 rv = dlm_dequeue_lkb_callback(lkb, &cb); in dlm_callback_work()