Btrfs: remove unnecessary key copy when logging inode
PATCH 1/1 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 <[email protected]>
--- fs/btrfs/tree-log.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
fs/btrfs/tree-log.c +2 -3
@@ -3167,11 +3167,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;
Signature · 1 line
1.7.9.5
Quoted 2 lines · Filipe David Borba Manana
The
btrfs_insert_empty_item()function doesn't modify its key argument.
Looks reasonable to me.
Reviewed-by Zach Brown <[email protected]>
- z