btrfs: go to matching label when cleaning em in btrfs_submit_direct

When btrfs_get_chunk_map fails to allocate a new em the cleanup does not
need to be done so the goto target is out_err, which is consistent with
current coding style.

Signed-off-by: Peng Hao <flyingpeng@tencent.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Peng Hao 2023-01-09 21:08:31 +01:00 committed by David Sterba
parent 1ec49744ba
commit d31de37850

View File

@ -8080,7 +8080,7 @@ static void btrfs_submit_direct(const struct iomap_iter *iter,
if (IS_ERR(em)) {
status = errno_to_blk_status(PTR_ERR(em));
em = NULL;
goto out_err_em;
goto out_err;
}
ret = btrfs_get_io_geometry(fs_info, em, btrfs_op(dio_bio),
logical, &geom);