Skip to contentSkip to conversation

dm: sparse: Annotate field with __rcu for checking

PATCH Applied Pranith Kumar 2 participants 2 messages Sep 25, 2014 – Sep 28, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm: sparse: Annotate field with __rcu for checking

Annotate the map field with __rcu since this is a rcu pointer which is checked by sparse.

---
 drivers/md/dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm.c +1 -1
index 32b958d..746411b 100644
@@ -140,7 +140,7 @@ struct mapped_device {
 	 * Use dm_get_live_table{_fast} or take suspend_lock for
 	 * dereference.
 	 */
-	struct dm_table *map;
+	struct dm_table __rcu *map;
 
 	unsigned long flags;
 
Signature · 1 line
2.1.0
#1 lore raw
Quoted 4 lines · Pranith Kumar

Annotate the map field with __rcu since this is a rcu pointer which is checked by sparse.

Queued them both, thank you!

Josh, given this change, are you OK with my applying your Reviewed-by to the RCU_INIT_POINTER() patch?

Thanx, Paul

Quoted 20 lines
---
 drivers/md/dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm.c +1 -1
index 32b958d..746411b 100644
@@ -140,7 +140,7 @@ struct mapped_device {
 	 * Use dm_get_live_table{_fast} or take suspend_lock for
 	 * dereference.
 	 */
-	struct dm_table *map;
+	struct dm_table __rcu *map;
 
 	unsigned long flags;
 
Signature · 1 line
2.1.0