summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMadhuparna Bhowmik <madhuparnabhowmik04@gmail.com>2019-12-05 01:49:01 +0530
committerDavid Sterba <dsterba@suse.com>2020-10-07 12:17:59 +0200
commit8d1a7aae89dc0c41ffb76fe1007dbba59d13881b (patch)
tree61bf6bb49611fa8cbb4f28d0949b837b23545400
parent96c2e067ed3e3e004580a643c76f58729206b829 (diff)
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] <asn:4> * 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) <joel@joelfernandes.org> Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--fs/btrfs/volumes.h2
1 files changed, 1 insertions, 1 deletions
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;