mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-10 19:28:49 -04:00
btrfs: avoid superfluous calls to free_extent_map() in btrfs_encoded_read()
Change the control flow of btrfs_encoded_read() so that it doesn't call free_extent_map() when we know that this has already been done. Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Mark Harmstone <maharmstone@fb.com> Suggested-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
committed by
David Sterba
parent
e36d114990
commit
08fdca9eee
@@ -9324,7 +9324,7 @@ ssize_t btrfs_encoded_read(struct kiocb *iocb, struct iov_iter *iter,
|
||||
ret = btrfs_encoded_read_inline(iocb, iter, start, lockend,
|
||||
cached_state, extent_start,
|
||||
count, encoded, &unlocked);
|
||||
goto out_em;
|
||||
goto out_unlock_extent;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -9384,7 +9384,7 @@ ssize_t btrfs_encoded_read(struct kiocb *iocb, struct iov_iter *iter,
|
||||
ret = -EFAULT;
|
||||
} else {
|
||||
ret = -EIOCBQUEUED;
|
||||
goto out_em;
|
||||
goto out_unlock_extent;
|
||||
}
|
||||
|
||||
out_em:
|
||||
|
||||
Reference in New Issue
Block a user