diff options
| author | Andreas Gruenbacher <agruen@linbit.com> | 2011-05-24 08:08:58 -0400 |
|---|---|---|
| committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 10:55:56 -0500 |
| commit | 5084d71d89e1a94193378efb12ac659e4e6ada3f (patch) | |
| tree | 3dcb2b69eaa77637808e7ea2adcee13b8ea9b2a8 /include/linux/genl_magic_func.h | |
| parent | 5f9359201b5cf1d94fe0e0c47fcba38cfc921863 (diff) | |
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/genl_magic_func.h')
| -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) | |||
| 158 | 158 | ||
| 159 | nla_for_each_attr(nla, head, len, rem) { | 159 | nla_for_each_attr(nla, head, len, rem) { |
| 160 | if (nla->nla_type & DRBD_GENLA_F_MANDATORY) { | 160 | if (nla->nla_type & DRBD_GENLA_F_MANDATORY) { |
| 161 | nla->nla_type &= ~DRBD_GENLA_F_MANDATORY; | ||
| 161 | if (nla_type(nla) > maxtype) | 162 | if (nla_type(nla) > maxtype) |
| 162 | return -EOPNOTSUPP; | 163 | return -EOPNOTSUPP; |
| 163 | nla->nla_type &= ~DRBD_GENLA_F_MANDATORY; | ||
| 164 | } | 164 | } |
| 165 | } | 165 | } |
| 166 | return 0; | 166 | return 0; |
