]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
btrfs: fix ASSERT em->len condition in btrfs_get_extent
authorTanmay Bhushan <007047221b@gmail.com>
Sat, 31 Dec 2022 15:05:01 +0000 (16:05 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Jan 2023 14:53:18 +0000 (15:53 +0100)
The em->len value is supposed to be verified in the assertion condition
though we expect it to be same as the sectorsize.

Fixes: a196a8944f77 ("btrfs: do not reset extent map members for inline extents read")
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Tanmay Bhushan <007047221b@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c

index bfcbe64eb8b3a7526a7d328484a36cac6602086f..940b404c8f28931c9864da923359185265e227d2 100644 (file)
@@ -7092,7 +7092,7 @@ next:
                 * Other members are not utilized for inline extents.
                 */
                ASSERT(em->block_start == EXTENT_MAP_INLINE);
-               ASSERT(em->len = fs_info->sectorsize);
+               ASSERT(em->len == fs_info->sectorsize);
 
                ret = read_inline_extent(inode, path, page);
                if (ret < 0)