From: Madhuparna Bhowmik Date: Wed, 4 Dec 2019 20:19:01 +0000 (+0530) Subject: btrfs: annotate device name rcu_string with __rcu X-Git-Tag: howlett/maple_spf/20210104~863^2~1 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8d1a7aae89dc0c41ffb76fe1007dbba59d13881b;p=users%2Fjedix%2Flinux-maple.git btrfs: annotate device name rcu_string with __rcu This patch fixes the following sparse errors in fs/btrfs/super.c in function btrfs_show_devname() fs/btrfs/super.c: error: incompatible types in comparison expression (different address spaces): fs/btrfs/super.c: struct rcu_string [noderef] * fs/btrfs/super.c: struct rcu_string * The error was because of the following line in function btrfs_show_devname(): if (first_dev) seq_escape(m, rcu_str_deref(first_dev->name), " \t\n\\"); Annotating the btrfs_device::name member with __rcu fixes the sparse error. Acked-by: Joel Fernandes (Google) Signed-off-by: Madhuparna Bhowmik Signed-off-by: David Sterba --- diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index 48bdca01e237..bf27ac07d315 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h @@ -58,7 +58,7 @@ struct btrfs_device { struct btrfs_fs_devices *fs_devices; struct btrfs_fs_info *fs_info; - struct rcu_string *name; + struct rcu_string __rcu *name; u64 generation;