summaryrefslogtreecommitdiffstats
path: root/include/linux/genl_magic_func.h
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2012-07-11 20:36:03 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 16:58:30 +0100
commit26ec92871be1e6bd48d0be9ab38ee1ebbeea49f1 (patch)
treeb6fa9987833a838778b37209bf21b9a4ee4f76c6 /include/linux/genl_magic_func.h
parent7e0f096b8d3ffcf04955c239e80993ec451c9a1a (diff)
downloadlinux-26ec92871be1e6bd48d0be9ab38ee1ebbeea49f1.tar.gz
linux-26ec92871be1e6bd48d0be9ab38ee1ebbeea49f1.tar.bz2
linux-26ec92871be1e6bd48d0be9ab38ee1ebbeea49f1.zip
drbd: Stop using NLA_PUT*().
These macros no longer exist in kernel version v3.5-rc1. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'include/linux/genl_magic_func.h')
-rw-r--r--include/linux/genl_magic_func.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/genl_magic_func.h b/include/linux/genl_magic_func.h
index 0b8a88e2e83e..023bc346b877 100644
--- a/include/linux/genl_magic_func.h
+++ b/include/linux/genl_magic_func.h
@@ -367,7 +367,8 @@ static inline int s_name ## _to_unpriv_skb(struct sk_buff *skb, \
__is_signed) \
if (!exclude_sensitive || !((attr_flag) & DRBD_F_SENSITIVE)) { \
DPRINT_FIELD(">>", nla_type, name, s, NULL); \
- __put(skb, attr_nr, s->name); \
+ if (__put(skb, attr_nr, s->name)) \
+ goto nla_put_failure; \
}
#undef __array
@@ -375,9 +376,10 @@ static inline int s_name ## _to_unpriv_skb(struct sk_buff *skb, \
__get, __put, __is_signed) \
if (!exclude_sensitive || !((attr_flag) & DRBD_F_SENSITIVE)) { \
DPRINT_ARRAY(">>",nla_type, name, s, NULL); \
- __put(skb, attr_nr, min_t(int, maxlen, \
+ if (__put(skb, attr_nr, min_t(int, maxlen, \
s->name ## _len + (nla_type == NLA_NUL_STRING)),\
- s->name); \
+ s->name)) \
+ goto nla_put_failure; \
}
#include GENL_MAGIC_INCLUDE_FILE