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)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 Feb 2022 15:19:48 +0000 (16:19 +0100)
commit51f892e206a704f0bc6d8ea81f79c4710636217c
treed061ec1a1a4164bf86c0d5a7a568a0528fbad555
parent4afe56d6d84942c637d341547fccaccb09e4b7ee
btrfs: pass the dentry to btrfs_log_new_name() instead of the inode

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>
fs/btrfs/inode.c
fs/btrfs/tree-log.c
fs/btrfs/tree-log.h