提交 8d1a7aae 编写于 作者: M Madhuparna Bhowmik 提交者: David Sterba

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: NJoel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: NMadhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 96c2e067
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册