提交 efd0c405 编写于 作者: F Filipe David Borba Manana 提交者: Chris Mason

Btrfs: remove unnecessary key copy when logging inode

The btrfs_insert_empty_item() function doesn't modify its
key argument.
Signed-off-by: NFilipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: NZach Brown <zab@redhat.com>
Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
Signed-off-by: NChris Mason <chris.mason@fusionio.com>
上级 452c75c3
......@@ -3170,11 +3170,10 @@ static int log_inode_item(struct btrfs_trans_handle *trans,
struct inode *inode)
{
struct btrfs_inode_item *inode_item;
struct btrfs_key key;
int ret;
memcpy(&key, &BTRFS_I(inode)->location, sizeof(key));
ret = btrfs_insert_empty_item(trans, log, path, &key,
ret = btrfs_insert_empty_item(trans, log, path,
&BTRFS_I(inode)->location,
sizeof(*inode_item));
if (ret && ret != -EEXIST)
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册