From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: =?UTF-8?q?Linus=20L=C3=BCssing?= Date: Fri, 4 Feb 2011 16:21:35 +0100 Message-Id: <1296832896-30081-7-git-send-email-linus.luessing@ascom.ch> In-Reply-To: <201102031802.52134.lindner_marek@yahoo.de> References: <201102031802.52134.lindner_marek@yahoo.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: [B.A.T.M.A.N.] [PATCH 6/7] batman-adv: add __rcu annotations for gw_node Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: b.a.t.m.a.n@lists.open-mesh.org Cc: =?UTF-8?q?Linus=20L=C3=BCssing?= Add __rcu annotations for the rcu protected bat_priv::curr_gw pointer to allow sparse checking. Signed-off-by: Linus Lüssing --- compat.h | 6 ++++++ types.h | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/batman-adv/compat.h b/batman-adv/compat.h index a76d0be..4e89049 100644 --- a/batman-adv/compat.h +++ b/batman-adv/compat.h @@ -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_ */ diff --git a/batman-adv/types.h b/batman-adv/types.h index 4ae11c3..4dc5854 100644 --- a/batman-adv/types.h +++ b/batman-adv/types.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; }; -- 1.7.2.3