]> git.baikalelectronics.ru Git - kernel.git/commit
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, 14 Mar 2022 12:13:47 +0000 (13:13 +0100)
commita134cf6e5864aa8eb1b8defcb658b218ee002fbd
tree844ada7bbcc43e7d8c0ec83b922ecef10266380f
parentc35abb22508c956fbaab7ddcc60cc946f28b0113
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