]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Fix suspicious RCU usage warning in btrfs_debug_in_rcu
authorMisono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Fri, 24 Aug 2018 02:35:28 +0000 (11:35 +0900)
committerDavid Sterba <dsterba@suse.com>
Fri, 24 Aug 2018 12:09:43 +0000 (14:09 +0200)
commit031954aa6f9cc29f538513224f1236b589671d5d
tree325b31756fd29ed4f2a38f3e74ee5c07829edb98
parentcb4d840f7ce647f3579ee32890ac2d0c68b240f1
btrfs: Fix suspicious RCU usage warning in btrfs_debug_in_rcu

Commit 7b49c60625b7 ("btrfs: Use wrapper macro for rcu string to remove
duplicate code") replaces some open coded RCU string handling with macro.

It turns out that btrfs_debug_in_rcu() is used for the first time and
the macro lacks lock/unlock of RCU string for non-debug case (i.e. when
the message is not printed), leading to suspicious RCU usage warning
when CONFIG_PROVE_RCU is on.

Fix this by adding a wrapper to call lock/unlock for the non-debug case
too.

Fixes: 7b49c60625b7 ("btrfs: Use wrapper macro for rcu string to remove duplicate code")
Reported-by: David Howells <dhowells@redhat.com>
Tested-by: David Howells <dhowells@redhat.com>
Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h