mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
idr: Delete idr_replace_ext function
Changing idr_replace's 'id' argument to 'unsigned long' works for all callers. Callers which passed a negative ID now get -ENOENT instead of -EINVAL. No callers relied on this error value. Signed-off-by: Matthew Wilcox <[email protected]>
This commit is contained in:
parent
9c16094140
commit
234a4624ef
7 changed files with 9 additions and 19 deletions
|
|
@ -348,7 +348,7 @@ void tcf_idr_insert(struct tc_action_net *tn, struct tc_action *a)
|
|||
struct tcf_idrinfo *idrinfo = tn->idrinfo;
|
||||
|
||||
spin_lock_bh(&idrinfo->lock);
|
||||
idr_replace_ext(&idrinfo->action_idr, a, a->tcfa_index);
|
||||
idr_replace(&idrinfo->action_idr, a, a->tcfa_index);
|
||||
spin_unlock_bh(&idrinfo->lock);
|
||||
}
|
||||
EXPORT_SYMBOL(tcf_idr_insert);
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ static int basic_change(struct net *net, struct sk_buff *in_skb,
|
|||
*arg = fnew;
|
||||
|
||||
if (fold) {
|
||||
idr_replace_ext(&head->handle_idr, fnew, fnew->handle);
|
||||
idr_replace(&head->handle_idr, fnew, fnew->handle);
|
||||
list_replace_rcu(&fold->link, &fnew->link);
|
||||
tcf_unbind_filter(tp, &fold->res);
|
||||
tcf_exts_get_net(&fold->exts);
|
||||
|
|
|
|||
|
|
@ -526,7 +526,7 @@ static int cls_bpf_change(struct net *net, struct sk_buff *in_skb,
|
|||
prog->gen_flags |= TCA_CLS_FLAGS_NOT_IN_HW;
|
||||
|
||||
if (oldprog) {
|
||||
idr_replace_ext(&head->handle_idr, prog, handle);
|
||||
idr_replace(&head->handle_idr, prog, handle);
|
||||
list_replace_rcu(&oldprog->link, &prog->link);
|
||||
tcf_unbind_filter(tp, &oldprog->res);
|
||||
tcf_exts_get_net(&oldprog->exts);
|
||||
|
|
|
|||
|
|
@ -967,7 +967,7 @@ static int fl_change(struct net *net, struct sk_buff *in_skb,
|
|||
|
||||
if (fold) {
|
||||
fnew->handle = handle;
|
||||
idr_replace_ext(&head->handle_idr, fnew, fnew->handle);
|
||||
idr_replace(&head->handle_idr, fnew, fnew->handle);
|
||||
list_replace_rcu(&fold->list, &fnew->list);
|
||||
tcf_unbind_filter(tp, &fold->res);
|
||||
tcf_exts_get_net(&fold->exts);
|
||||
|
|
|
|||
|
|
@ -848,7 +848,7 @@ static void u32_replace_knode(struct tcf_proto *tp, struct tc_u_common *tp_c,
|
|||
if (pins->handle == n->handle)
|
||||
break;
|
||||
|
||||
idr_replace_ext(&ht->handle_idr, n, n->handle);
|
||||
idr_replace(&ht->handle_idr, n, n->handle);
|
||||
RCU_INIT_POINTER(n->next, pins->next);
|
||||
rcu_assign_pointer(*ins, n);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue