act_vlan.c (b409074e6693bcdaa7abbee2a035f22a9eabda53) | act_vlan.c (4e8ddd7f1758ca4ddd0c1f7cf3e66fce736241d2) |
---|---|
1/* 2 * Copyright (c) 2014 Jiri Pirko <jiri@resnulli.us> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 */ --- 173 unchanged lines hidden (view full) --- 182 183 if (!exists) { 184 ret = tcf_idr_create(tn, parm->index, est, a, 185 &act_vlan_ops, bind, true); 186 if (ret) 187 return ret; 188 189 ret = ACT_P_CREATED; | 1/* 2 * Copyright (c) 2014 Jiri Pirko <jiri@resnulli.us> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 */ --- 173 unchanged lines hidden (view full) --- 182 183 if (!exists) { 184 ret = tcf_idr_create(tn, parm->index, est, a, 185 &act_vlan_ops, bind, true); 186 if (ret) 187 return ret; 188 189 ret = ACT_P_CREATED; |
190 } else { | 190 } else if (!ovr) { |
191 tcf_idr_release(*a, bind); | 191 tcf_idr_release(*a, bind); |
192 if (!ovr) 193 return -EEXIST; | 192 return -EEXIST; |
194 } 195 196 v = to_vlan(*a); 197 198 ASSERT_RTNL(); 199 p = kzalloc(sizeof(*p), GFP_KERNEL); 200 if (!p) { | 193 } 194 195 v = to_vlan(*a); 196 197 ASSERT_RTNL(); 198 p = kzalloc(sizeof(*p), GFP_KERNEL); 199 if (!p) { |
201 if (ret == ACT_P_CREATED) 202 tcf_idr_release(*a, bind); | 200 tcf_idr_release(*a, bind); |
203 return -ENOMEM; 204 } 205 206 v->tcf_action = parm->action; 207 208 p_old = rtnl_dereference(v->vlan_p); 209 210 p->tcfv_action = action; --- 135 unchanged lines hidden --- | 201 return -ENOMEM; 202 } 203 204 v->tcf_action = parm->action; 205 206 p_old = rtnl_dereference(v->vlan_p); 207 208 p->tcfv_action = action; --- 135 unchanged lines hidden --- |