From: Filipe David Borba Manana Date: Mon, 7 Oct 2013 20:20:44 +0000 (+0100) Subject: Btrfs: remove unnecessary key copy when logging inode X-Git-Tag: v3.13-rc3~10^2~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=efd0c4055a26e88689b3c0cf95492dfe147cba67;p=profile%2Fcommon%2Fkernel-common.git 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 Reviewed-by: Zach Brown Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 1134aa4..f2e0531 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;