On Wed, Nov 14, 2018 at 05:05:48PM +0100, David Sterba wrote:
>On Wed, Nov 14, 2018 at 03:24:56PM +0800, Lu Fengqi wrote:
>> =============================
>> WARNING: suspicious RCU usage
>> 4.20.0-rc2+ #23 Tainted: G           O
>> -----------------------------
>> fs/btrfs/volumes.c:886 suspicious rcu_dereference_check() usage!
>> 
>> Use btrfs_info_in_rcu instead of pr_info for the required lock/unlock of
>> RCU string.
>> 
>> Fixes: 1f265fc6f58b ("btrfs: harden agaist duplicate fsid on scanned 
>> devices")
>
>Thanks for the fix.
>
>Please note that the patch is still in the devel queue (misc-next) so
>the commit id is unstable, and such fixups get folded to the patch.
>
>You may also reply to the original mail with patch, but sending a bare
>code change without a full changelog is also fine if the original patch
>was sent long time ago and the fixup could get lost.

Got it.

-- 
Thanks,
Lu

>
>> Signed-off-by: Lu Fengqi <lufq.f...@cn.fujitsu.com>
>> ---
>>  fs/btrfs/volumes.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>> 
>> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
>> index 2186300bab91..6039ae5c549e 100644
>> --- a/fs/btrfs/volumes.c
>> +++ b/fs/btrfs/volumes.c
>> @@ -873,15 +873,15 @@ static noinline struct btrfs_device 
>> *device_list_add(const char *path,
>>                      if (device->bdev != path_bdev) {
>>                              bdput(path_bdev);
>>                              mutex_unlock(&fs_devices->device_list_mutex);
>> -                            pr_warn(
>> -            "BTRFS: duplicate device fsid:devid for %pU:%llu old:%s 
>> new:%s\n",
>> +                            btrfs_warn_in_rcu(device->fs_info,
>> +                    "duplicate device fsid:devid for %pU:%llu old:%s 
>> new:%s\n",
>
>The trailing newline is appended by all btrfs_* message helpers, removed
>in the commit.
>
>


Reply via email to