* [PATCH] btrfs: Fix ASSERT of em->len when getting extent
@ 2022-12-31 15:05 Tanmay Bhushan
2023-01-02 15:01 ` David Sterba
2023-01-03 9:15 ` Anand Jain
0 siblings, 2 replies; 3+ messages in thread
From: Tanmay Bhushan @ 2022-12-31 15:05 UTC (permalink / raw)
To: Chris Mason, Josef Bacik, David Sterba, linux-btrfs, linux-kernel
Cc: Tanmay Bhushan
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);
ret = read_inline_extent(inode, path, page);
if (ret < 0)
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: Fix ASSERT of em->len when getting extent
2022-12-31 15:05 [PATCH] btrfs: Fix ASSERT of em->len when getting extent Tanmay Bhushan
@ 2023-01-02 15:01 ` David Sterba
2023-01-03 9:15 ` Anand Jain
1 sibling, 0 replies; 3+ messages in thread
From: David Sterba @ 2023-01-02 15:01 UTC (permalink / raw)
To: Tanmay Bhushan
Cc: Chris Mason, Josef Bacik, David Sterba, linux-btrfs, linux-kernel
On Sat, Dec 31, 2022 at 04:05:01PM +0100, 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>
Added to misc-next, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] btrfs: Fix ASSERT of em->len when getting extent
2022-12-31 15:05 [PATCH] btrfs: Fix ASSERT of em->len when getting extent Tanmay Bhushan
2023-01-02 15:01 ` David Sterba
@ 2023-01-03 9:15 ` Anand Jain
1 sibling, 0 replies; 3+ messages in thread
From: Anand Jain @ 2023-01-03 9:15 UTC (permalink / raw)
To: Tanmay Bhushan, Chris Mason, Josef Bacik, David Sterba,
linux-btrfs, linux-kernel
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)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-03 9:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-31 15:05 [PATCH] btrfs: Fix ASSERT of em->len when getting extent Tanmay Bhushan
2023-01-02 15:01 ` David Sterba
2023-01-03 9:15 ` Anand Jain
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.