diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2011-05-24 14:08:58 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 16:55:56 +0100 |
commit | 5084d71d89e1a94193378efb12ac659e4e6ada3f (patch) | |
tree | 3dcb2b69eaa77637808e7ea2adcee13b8ea9b2a8 /include/linux | |
parent | 5f9359201b5cf1d94fe0e0c47fcba38cfc921863 (diff) | |
download | lwn-5084d71d89e1a94193378efb12ac659e4e6ada3f.tar.gz lwn-5084d71d89e1a94193378efb12ac659e4e6ada3f.zip |
drbd: drbd_nla_check_mandatory(): Need to remove the DRBD_GENLA_F_MANDATORY flag first
We need to remove the flag before checking for valid types.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/genl_magic_func.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/genl_magic_func.h b/include/linux/genl_magic_func.h index 58edd403a3ff..357f2ad403b1 100644 --- a/include/linux/genl_magic_func.h +++ b/include/linux/genl_magic_func.h @@ -158,9 +158,9 @@ static inline int drbd_nla_check_mandatory(int maxtype, struct nlattr *nla) nla_for_each_attr(nla, head, len, rem) { if (nla->nla_type & DRBD_GENLA_F_MANDATORY) { + nla->nla_type &= ~DRBD_GENLA_F_MANDATORY; if (nla_type(nla) > maxtype) return -EOPNOTSUPP; - nla->nla_type &= ~DRBD_GENLA_F_MANDATORY; } } return 0; |