Commit 8e3c9d3c authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: remove btrfs_inode parameter from btrfs_delayed_inode_reserve_metadata

It's only used for tracepoint to obtain the inode number, but we already
have the ino from btrfs_delayed_node::inode_id.
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent ae396a3b
...@@ -602,7 +602,6 @@ static void btrfs_delayed_item_release_metadata(struct btrfs_root *root, ...@@ -602,7 +602,6 @@ static void btrfs_delayed_item_release_metadata(struct btrfs_root *root,
static int btrfs_delayed_inode_reserve_metadata( static int btrfs_delayed_inode_reserve_metadata(
struct btrfs_trans_handle *trans, struct btrfs_trans_handle *trans,
struct btrfs_root *root, struct btrfs_root *root,
struct btrfs_inode *inode,
struct btrfs_delayed_node *node) struct btrfs_delayed_node *node)
{ {
struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_fs_info *fs_info = root->fs_info;
...@@ -647,7 +646,7 @@ static int btrfs_delayed_inode_reserve_metadata( ...@@ -647,7 +646,7 @@ static int btrfs_delayed_inode_reserve_metadata(
node->bytes_reserved = num_bytes; node->bytes_reserved = num_bytes;
trace_btrfs_space_reservation(fs_info, trace_btrfs_space_reservation(fs_info,
"delayed_inode", "delayed_inode",
btrfs_ino(inode), node->inode_id,
num_bytes, 1); num_bytes, 1);
} else { } else {
btrfs_qgroup_free_meta_prealloc(root, num_bytes); btrfs_qgroup_free_meta_prealloc(root, num_bytes);
...@@ -658,7 +657,7 @@ static int btrfs_delayed_inode_reserve_metadata( ...@@ -658,7 +657,7 @@ static int btrfs_delayed_inode_reserve_metadata(
ret = btrfs_block_rsv_migrate(src_rsv, dst_rsv, num_bytes, true); ret = btrfs_block_rsv_migrate(src_rsv, dst_rsv, num_bytes, true);
if (!ret) { if (!ret) {
trace_btrfs_space_reservation(fs_info, "delayed_inode", trace_btrfs_space_reservation(fs_info, "delayed_inode",
btrfs_ino(inode), num_bytes, 1); node->inode_id, num_bytes, 1);
node->bytes_reserved = num_bytes; node->bytes_reserved = num_bytes;
} }
...@@ -1833,8 +1832,7 @@ int btrfs_delayed_update_inode(struct btrfs_trans_handle *trans, ...@@ -1833,8 +1832,7 @@ int btrfs_delayed_update_inode(struct btrfs_trans_handle *trans,
goto release_node; goto release_node;
} }
ret = btrfs_delayed_inode_reserve_metadata(trans, root, inode, ret = btrfs_delayed_inode_reserve_metadata(trans, root, delayed_node);
delayed_node);
if (ret) if (ret)
goto release_node; goto release_node;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment