btrfs: pass the dentry to btrfs_log_new_name() instead of the inode
authorFilipe Manana <fdmanana@suse.com>
Thu, 20 Jan 2022 11:00:07 +0000 (11:00 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2022 15:16:36 +0000 (17:16 +0200)
commitda7ad2ec580b8ea84856988415fe084643890937
tree211cdbe06a0ec4c45f89e1201bf826ad9081324a
parent90b9e489270429877aef8750c4993f54d9744126
btrfs: pass the dentry to btrfs_log_new_name() instead of the inode

[ Upstream commit d5f5bd546552a94eefd68c42f40f778c40a89d2c ]

In the next patch in the series, there will be the need to access the old
name, and its length, of an inode when logging the inode during a rename.
So instead of passing the inode to btrfs_log_new_name() pass the dentry,
because from the dentry we can get the inode, the name and its length.

This will avoid passing 3 new parameters to btrfs_log_new_name() in the
next patch - the name, its length and an index number. This way we end
up passing only 1 new parameter, the index number.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/inode.c
fs/btrfs/tree-log.c
fs/btrfs/tree-log.h