summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorFilipe David Borba Manana2013-10-07 22:20:44 +0200
committerChris Mason2013-11-12 03:59:30 +0100
commitefd0c4055a26e88689b3c0cf95492dfe147cba67 (patch)
tree9c92856460fc0f1309f14ffd36a74b644505070c /fs/btrfs/tree-log.c
parentBtrfs: Simplify the logic in alloc_extent_buffer() for existing extent buffer... (diff)
downloadkernel-qcow2-linux-efd0c4055a26e88689b3c0cf95492dfe147cba67.tar.gz
kernel-qcow2-linux-efd0c4055a26e88689b3c0cf95492dfe147cba67.tar.xz
kernel-qcow2-linux-efd0c4055a26e88689b3c0cf95492dfe147cba67.zip
Btrfs: remove unnecessary key copy when logging inode
The btrfs_insert_empty_item() function doesn't modify its key argument. Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Reviewed-by: Zach Brown <zab@redhat.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 1134aa40b6d1..f2e0531dc719 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -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;