[6/7] batman-adv: add __rcu annotations for gw_node
Commit Message
Add __rcu annotations for the rcu protected bat_priv::curr_gw pointer to
allow sparse checking.
Signed-off-by: Linus Lüssing <linus.luessing@ascom.ch>
---
compat.h | 6 ++++++
types.h | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
Comments
On Friday 04 February 2011 16:21:35 Linus Lüssing wrote:
> Add __rcu annotations for the rcu protected bat_priv::curr_gw pointer to
> allow sparse checking.
Applied in revision 1942.
Thanks,
Marek
@@ -270,4 +270,10 @@ int bat_seq_printf(struct seq_file *m, const char *f, ...);
#endif /* < KERNEL_VERSION(2, 6, 33) */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
+
+#define __rcu
+
+#endif /* < KERNEL_VERSION(2, 6, 36) */
+
#endif /* _NET_BATMAN_ADV_COMPAT_H_ */
@@ -171,7 +171,7 @@ struct bat_priv {
struct delayed_work hna_work;
struct delayed_work orig_work;
struct delayed_work vis_work;
- struct gw_node *curr_gw;
+ struct gw_node __rcu *curr_gw; /* rcu protected pointer */
struct vis_info *my_vis_info;
};