lkml.org 
[lkml]   [2023]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] btrfs: Fix ASSERT of em->len when getting extent
From
On 12/31/22 23:05, Tanmay Bhushan wrote:
> em->len is incorrectly asserted which is leading to it's
> assignment to sectorsize instead of being check for it.
>
> Signed-off-by: Tanmay Bhushan <007047221b@gmail.com>
> ---
> fs/btrfs/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index 8bcad9940154..e49358048a98 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -7092,7 +7092,7 @@ struct extent_map *btrfs_get_extent(struct btrfs_inode *inode,
> * 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);

Good catch.

Reviewed-by: Anand Jain <anand.jain@oracle.com>

>
> ret = read_inline_extent(inode, path, page);
> if (ret < 0)

\
 
 \ /
  Last update: 2023-03-26 23:25    [W:0.059 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site