]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NETLINK]: Mark attribute construction exception unlikely
authorPatrick McHardy <kaber@trash.net>
Wed, 5 Dec 2007 11:31:53 +0000 (03:31 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:56:34 +0000 (14:56 -0800)
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netlink.h
include/net/netlink.h

index d5bfaba595c79e796be9d105b0359d02ac5a88a8..2aee0f51087646361f89d0c2bc32adb6ca27c3cf 100644 (file)
@@ -245,7 +245,7 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags)
 }
 
 #define NLMSG_NEW(skb, pid, seq, type, len, flags) \
-({     if (skb_tailroom(skb) < (int)NLMSG_SPACE(len)) \
+({     if (unlikely(skb_tailroom(skb) < (int)NLMSG_SPACE(len))) \
                goto nlmsg_failure; \
        __nlmsg_put(skb, pid, seq, type, len, flags); })
 
index 9298218c07f9afa7fda027fcbb07a8b4684b673f..db4b935b6c7e3b26ec746bf17c467b0ec872d042 100644 (file)
@@ -862,7 +862,7 @@ static inline int nla_put_msecs(struct sk_buff *skb, int attrtype,
 
 #define NLA_PUT(skb, attrtype, attrlen, data) \
        do { \
-               if (nla_put(skb, attrtype, attrlen, data) < 0) \
+               if (unlikely(nla_put(skb, attrtype, attrlen, data) < 0)) \
                        goto nla_put_failure; \
        } while(0)