Skip to content

Commit 15fe48e

Browse files
fdmananakdave
authored andcommitted
btrfs: remove root argument from btrfs_del_dir_entries_in_log()
There's no need to pass the root as we can extract it from the directory inode, so remove it. Reviewed-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 4b8bd7b commit 15fe48e

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

fs/btrfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4363,7 +4363,7 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans,
43634363
*/
43644364
if (!rename_ctx) {
43654365
btrfs_del_inode_ref_in_log(trans, root, name, inode, dir_ino);
4366-
btrfs_del_dir_entries_in_log(trans, root, name, dir, index);
4366+
btrfs_del_dir_entries_in_log(trans, name, dir, index);
43674367
}
43684368

43694369
/*

fs/btrfs/tree-log.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3900,10 +3900,10 @@ static int del_logged_dentry(struct btrfs_trans_handle *trans,
39003900
* or the entire directory.
39013901
*/
39023902
void btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,
3903-
struct btrfs_root *root,
39043903
const struct fscrypt_str *name,
39053904
struct btrfs_inode *dir, u64 index)
39063905
{
3906+
struct btrfs_root *root = dir->root;
39073907
BTRFS_PATH_AUTO_FREE(path);
39083908
int ret;
39093909

fs/btrfs/tree-log.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ int btrfs_log_dentry_safe(struct btrfs_trans_handle *trans,
7979
struct dentry *dentry,
8080
struct btrfs_log_ctx *ctx);
8181
void btrfs_del_dir_entries_in_log(struct btrfs_trans_handle *trans,
82-
struct btrfs_root *root,
8382
const struct fscrypt_str *name,
8483
struct btrfs_inode *dir, u64 index);
8584
void btrfs_del_inode_ref_in_log(struct btrfs_trans_handle *trans,

0 commit comments

Comments
 (0)