Merge tag 'landlock_v34' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux-2.6-microblaze.git] / net / netfilter / nfnetlink_osf.c
index 916a3c7..e8f8875 100644 (file)
@@ -292,10 +292,9 @@ static const struct nla_policy nfnl_osf_policy[OSF_ATTR_MAX + 1] = {
        [OSF_ATTR_FINGER]       = { .len = sizeof(struct nf_osf_user_finger) },
 };
 
-static int nfnl_osf_add_callback(struct net *net, struct sock *ctnl,
-                                struct sk_buff *skb, const struct nlmsghdr *nlh,
-                                const struct nlattr * const osf_attrs[],
-                                struct netlink_ext_ack *extack)
+static int nfnl_osf_add_callback(struct sk_buff *skb,
+                                const struct nfnl_info *info,
+                                const struct nlattr * const osf_attrs[])
 {
        struct nf_osf_user_finger *f;
        struct nf_osf_finger *kf = NULL, *sf;
@@ -307,7 +306,7 @@ static int nfnl_osf_add_callback(struct net *net, struct sock *ctnl,
        if (!osf_attrs[OSF_ATTR_FINGER])
                return -EINVAL;
 
-       if (!(nlh->nlmsg_flags & NLM_F_CREATE))
+       if (!(info->nlh->nlmsg_flags & NLM_F_CREATE))
                return -EINVAL;
 
        f = nla_data(osf_attrs[OSF_ATTR_FINGER]);
@@ -325,7 +324,7 @@ static int nfnl_osf_add_callback(struct net *net, struct sock *ctnl,
                kfree(kf);
                kf = NULL;
 
-               if (nlh->nlmsg_flags & NLM_F_EXCL)
+               if (info->nlh->nlmsg_flags & NLM_F_EXCL)
                        err = -EEXIST;
                break;
        }
@@ -339,11 +338,9 @@ static int nfnl_osf_add_callback(struct net *net, struct sock *ctnl,
        return err;
 }
 
-static int nfnl_osf_remove_callback(struct net *net, struct sock *ctnl,
-                                   struct sk_buff *skb,
-                                   const struct nlmsghdr *nlh,
-                                   const struct nlattr * const osf_attrs[],
-                                   struct netlink_ext_ack *extack)
+static int nfnl_osf_remove_callback(struct sk_buff *skb,
+                                   const struct nfnl_info *info,
+                                   const struct nlattr * const osf_attrs[])
 {
        struct nf_osf_user_finger *f;
        struct nf_osf_finger *sf;
@@ -377,11 +374,13 @@ static int nfnl_osf_remove_callback(struct net *net, struct sock *ctnl,
 static const struct nfnl_callback nfnl_osf_callbacks[OSF_MSG_MAX] = {
        [OSF_MSG_ADD]   = {
                .call           = nfnl_osf_add_callback,
+               .type           = NFNL_CB_MUTEX,
                .attr_count     = OSF_ATTR_MAX,
                .policy         = nfnl_osf_policy,
        },
        [OSF_MSG_REMOVE]        = {
                .call           = nfnl_osf_remove_callback,
+               .type           = NFNL_CB_MUTEX,
                .attr_count     = OSF_ATTR_MAX,
                .policy         = nfnl_osf_policy,
        },