提交 a5959bc0 编写于 作者: T Thomas Meyer 提交者: Josef Bacik

Btrfs: Cocci spatch "memdup.spatch"

Signed-off-by: NThomas Meyer <thomas@m3y3r.de>
Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
上级 97a184fe
......@@ -3422,10 +3422,9 @@ static int __find_xattr(int num, struct btrfs_key *di_key,
strncmp(name, ctx->name, name_len) == 0) {
ctx->found_idx = num;
ctx->found_data_len = data_len;
ctx->found_data = kmalloc(data_len, GFP_NOFS);
ctx->found_data = kmemdup(data, data_len, GFP_NOFS);
if (!ctx->found_data)
return -ENOMEM;
memcpy(ctx->found_data, data, data_len);
return 1;
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册