btrfs: go to matching label when cleaning em in btrfs_submit_direct
authorPeng Hao <flyingpeng@tencent.com>
Mon, 9 Jan 2023 20:08:31 +0000 (21:08 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Feb 2023 16:50:33 +0000 (17:50 +0100)
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>
fs/btrfs/inode.c

index 77c2acc06891f8e519afff41bf80d05e80136d8f..7fa1db6a474ab2342cc1c2e255fecd55f992b435 100644 (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);