Re: [PATCH] btrfs: fix memdup.cocci warnings

From: Josef Bacik
Date: Tue Sep 22 2020 - 09:09:49 EST


On 9/22/20 6:21 AM, Julia Lawall wrote:
From: kernel test robot <lkp@xxxxxxxxx>

fs/btrfs/send.c:3854:8-15: WARNING opportunity for kmemdup

Use kmemdup rather than duplicating its implementation

Generated by: scripts/coccinelle/api/memdup.cocci

Fixes: 28314eb24e6c ("btrfs: send, recompute reference path after orphanization of a directory")
Signed-off-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Julia Lawall <julia.lawall@xxxxxxxx>

Reviewed-by: Josef Bacik <josef@xxxxxxxxxxxxxx>

Thanks,

Josef