mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: fib_notifier: propagate extack down to the notifier block callback
Since errors are propagated all the way up to the caller, propagate possible extack of the caller all the way down to the notifier block callback. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3f9e5c119a
commit
b7a595577e
20 changed files with 105 additions and 61 deletions
|
@ -50,11 +50,13 @@ static inline int mr_call_vif_notifier(struct notifier_block *nb,
|
|||
unsigned short family,
|
||||
enum fib_event_type event_type,
|
||||
struct vif_device *vif,
|
||||
unsigned short vif_index, u32 tb_id)
|
||||
unsigned short vif_index, u32 tb_id,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct vif_entry_notifier_info info = {
|
||||
.info = {
|
||||
.family = family,
|
||||
.extack = extack,
|
||||
},
|
||||
.dev = vif->dev,
|
||||
.vif_index = vif_index,
|
||||
|
@ -172,11 +174,13 @@ struct mfc_entry_notifier_info {
|
|||
static inline int mr_call_mfc_notifier(struct notifier_block *nb,
|
||||
unsigned short family,
|
||||
enum fib_event_type event_type,
|
||||
struct mr_mfc *mfc, u32 tb_id)
|
||||
struct mr_mfc *mfc, u32 tb_id,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mfc_entry_notifier_info info = {
|
||||
.info = {
|
||||
.family = family,
|
||||
.extack = extack,
|
||||
},
|
||||
.mfc = mfc,
|
||||
.tb_id = tb_id
|
||||
|
@ -295,10 +299,11 @@ int mr_rtm_dumproute(struct sk_buff *skb, struct netlink_callback *cb,
|
|||
|
||||
int mr_dump(struct net *net, struct notifier_block *nb, unsigned short family,
|
||||
int (*rules_dump)(struct net *net,
|
||||
struct notifier_block *nb),
|
||||
struct notifier_block *nb,
|
||||
struct netlink_ext_ack *extack),
|
||||
struct mr_table *(*mr_iter)(struct net *net,
|
||||
struct mr_table *mrt),
|
||||
rwlock_t *mrt_lock);
|
||||
rwlock_t *mrt_lock, struct netlink_ext_ack *extack);
|
||||
#else
|
||||
static inline void vif_device_init(struct vif_device *v,
|
||||
struct net_device *dev,
|
||||
|
@ -349,10 +354,11 @@ mr_rtm_dumproute(struct sk_buff *skb, struct netlink_callback *cb,
|
|||
static inline int mr_dump(struct net *net, struct notifier_block *nb,
|
||||
unsigned short family,
|
||||
int (*rules_dump)(struct net *net,
|
||||
struct notifier_block *nb),
|
||||
struct notifier_block *nb,
|
||||
struct netlink_ext_ack *extack),
|
||||
struct mr_table *(*mr_iter)(struct net *net,
|
||||
struct mr_table *mrt),
|
||||
rwlock_t *mrt_lock)
|
||||
rwlock_t *mrt_lock, struct netlink_ext_ack *extack)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue