diff options
author | 2025-03-06 17:45:40 +0000 | |
---|---|---|
committer | 2025-03-18 20:35:50 +0100 | |
commit | 0c8337c22043511549162df877cf752566aeedb9 (patch) | |
tree | 054a1e186a5aee101da02899f5e51595b2dec687 | |
parent | btrfs: avoid unnecessary bio dereference at run_one_async_done() (diff) | |
download | wireguard-linux-0c8337c22043511549162df877cf752566aeedb9.tar.xz wireguard-linux-0c8337c22043511549162df877cf752566aeedb9.zip |
btrfs: send: remove unnecessary inode lookup at send_encoded_inline_extent()
We are doing a lookup of the inode but we don't use it at all. So just
remove this pointless lookup.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to '')
-rw-r--r-- | fs/btrfs/send.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index e225530d3ebb..329ccd6f2759 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -5521,9 +5521,7 @@ static int send_encoded_inline_extent(struct send_ctx *sctx, struct btrfs_path *path, u64 offset, u64 len) { - struct btrfs_root *root = sctx->send_root; - struct btrfs_fs_info *fs_info = root->fs_info; - struct inode *inode; + struct btrfs_fs_info *fs_info = sctx->send_root->fs_info; struct fs_path *fspath; struct extent_buffer *leaf = path->nodes[0]; struct btrfs_key key; @@ -5532,10 +5530,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 +5568,6 @@ static int send_encoded_inline_extent(struct send_ctx *sctx, tlv_put_failure: out: - iput(inode); return ret; } |