dm: remove queue next_ordered workaround for barriers
[safe/jmp/linux-2.6] / include / linux / netlink.h
index bec1062..5ba398e 100644 (file)
@@ -103,6 +103,8 @@ struct nlmsgerr
 #define NETLINK_ADD_MEMBERSHIP 1
 #define NETLINK_DROP_MEMBERSHIP        2
 #define NETLINK_PKTINFO                3
+#define NETLINK_BROADCAST_ERROR        4
+#define NETLINK_NO_ENOBUFS     5
 
 struct nl_pktinfo
 {
@@ -193,7 +195,7 @@ extern int netlink_unregister_notifier(struct notifier_block *nb);
 
 /* finegrained unicast helpers: */
 struct sock *netlink_getsockbyfilp(struct file *filp);
-int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock,
+int netlink_attachskb(struct sock *sk, struct sk_buff *skb,
                      long *timeo, struct sock *ssk);
 void netlink_detachskb(struct sock *sk, struct sk_buff *skb);
 int netlink_sendskb(struct sock *sk, struct sk_buff *skb);
@@ -242,7 +244,8 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags)
        nlh->nlmsg_flags = flags;
        nlh->nlmsg_pid = pid;
        nlh->nlmsg_seq = seq;
-       memset(NLMSG_DATA(nlh) + len, 0, NLMSG_ALIGN(size) - size);
+       if (!__builtin_constant_p(size) || NLMSG_ALIGN(size) - size != 0)
+               memset(NLMSG_DATA(nlh) + len, 0, NLMSG_ALIGN(size) - size);
        return nlh;
 }