Misono Tomohiro <misono.tomohiro@xxxxxxxxxxxxxx> wrote:
> commit 672d599041c8 ("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 message is not printed), leading suspicious RCU usage warning
> when CONFIG_PROVE_RCU is on.
>
> Fix this by adding a wrapper to call lock/unlock for non debug case too.
>
> Fixes: 672d599041c8 ("btrfs: Use wrapper macro for rcu string to remove
> duplicate code")
> Reported-by: David Howells <dhowells@xxxxxxxxxx>
> Signed-off-by: Misono Tomohiro <misono.tomohiro@xxxxxxxxxxxxxx>
Tested-by: David Howells <dhowells@xxxxxxxxxx>