Lines Matching refs:block_cb

810 void *tcf_block_cb_priv(struct tcf_block_cb *block_cb)  in tcf_block_cb_priv()  argument
812 return block_cb->cb_priv; in tcf_block_cb_priv()
818 { struct tcf_block_cb *block_cb; in tcf_block_cb_lookup() local
820 list_for_each_entry(block_cb, &block->cb_list, list) in tcf_block_cb_lookup()
821 if (block_cb->cb == cb && block_cb->cb_ident == cb_ident) in tcf_block_cb_lookup()
822 return block_cb; in tcf_block_cb_lookup()
827 void tcf_block_cb_incref(struct tcf_block_cb *block_cb) in tcf_block_cb_incref() argument
829 block_cb->refcnt++; in tcf_block_cb_incref()
833 unsigned int tcf_block_cb_decref(struct tcf_block_cb *block_cb) in tcf_block_cb_decref() argument
835 return --block_cb->refcnt; in tcf_block_cb_decref()
877 struct tcf_block_cb *block_cb; in __tcf_block_cb_register() local
887 block_cb = kzalloc(sizeof(*block_cb), GFP_KERNEL); in __tcf_block_cb_register()
888 if (!block_cb) in __tcf_block_cb_register()
890 block_cb->cb = cb; in __tcf_block_cb_register()
891 block_cb->cb_ident = cb_ident; in __tcf_block_cb_register()
892 block_cb->cb_priv = cb_priv; in __tcf_block_cb_register()
893 list_add(&block_cb->list, &block->cb_list); in __tcf_block_cb_register()
894 return block_cb; in __tcf_block_cb_register()
902 struct tcf_block_cb *block_cb; in tcf_block_cb_register() local
904 block_cb = __tcf_block_cb_register(block, cb, cb_ident, cb_priv, in tcf_block_cb_register()
906 return PTR_ERR_OR_ZERO(block_cb); in tcf_block_cb_register()
911 struct tcf_block_cb *block_cb) in __tcf_block_cb_unregister() argument
913 tcf_block_playback_offloads(block, block_cb->cb, block_cb->cb_priv, in __tcf_block_cb_unregister()
916 list_del(&block_cb->list); in __tcf_block_cb_unregister()
917 kfree(block_cb); in __tcf_block_cb_unregister()
924 struct tcf_block_cb *block_cb; in tcf_block_cb_unregister() local
926 block_cb = tcf_block_cb_lookup(block, cb, cb_ident); in tcf_block_cb_unregister()
927 if (!block_cb) in tcf_block_cb_unregister()
929 __tcf_block_cb_unregister(block, block_cb); in tcf_block_cb_unregister()
936 struct tcf_block_cb *block_cb; in tcf_block_cb_call() local
944 list_for_each_entry(block_cb, &block->cb_list, list) { in tcf_block_cb_call()
945 err = block_cb->cb(type, type_data, block_cb->cb_priv); in tcf_block_cb_call()