diff mbox series

[1/2] btrfs: send: remove unnecessary inode lookup at send_encoded_inline_extent()

Message ID 89867e61f94b9a9f3711f66c141e4d483a9cc6bd.1741283556.git.fdmanana@suse.com (mailing list archive)
State New
Headers show
Series btrfs: send: a couple trivial cleanups | expand

Commit Message

Filipe Manana March 6, 2025, 5:55 p.m. UTC
From: Filipe Manana <fdmanana@suse.com>

We doing a lookup of the inode but we don't use it at all. So just remove
this pointless lookup.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
---
 fs/btrfs/send.c | 6 ------
 1 file changed, 6 deletions(-)
diff mbox series

Patch

diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index e225530d3ebb..41e913e01d49 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -5523,7 +5523,6 @@  static int send_encoded_inline_extent(struct send_ctx *sctx,
 {
 	struct btrfs_root *root = sctx->send_root;
 	struct btrfs_fs_info *fs_info = root->fs_info;
-	struct inode *inode;
 	struct fs_path *fspath;
 	struct extent_buffer *leaf = path->nodes[0];
 	struct btrfs_key key;
@@ -5532,10 +5531,6 @@  static int send_encoded_inline_extent(struct send_ctx *sctx,
 	size_t inline_size;
 	int ret;
 
-	inode = btrfs_iget(sctx->cur_ino, root);
-	if (IS_ERR(inode))
-		return PTR_ERR(inode);
-
 	fspath = get_cur_inode_path(sctx);
 	if (IS_ERR(fspath)) {
 		ret = PTR_ERR(fspath);
@@ -5574,7 +5569,6 @@  static int send_encoded_inline_extent(struct send_ctx *sctx,
 
 tlv_put_failure:
 out:
-	iput(inode);
 	return ret;
 }