From: Anand Jain <anand.jain@oracle.com>
To: Tanmay Bhushan <007047221b@gmail.com>, Chris Mason <clm@fb.com>,
Josef Bacik <josef@toxicpanda.com>,
David Sterba <dsterba@suse.com>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] btrfs: Fix ASSERT of em->len when getting extent
Date: Tue, 3 Jan 2023 17:15:11 +0800 [thread overview]
Message-ID: <6ab14932-4b97-021c-4373-9a1aed86ac71@oracle.com> (raw)
In-Reply-To: <20221231150501.123205-1-007047221b@gmail.com>
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)
prev parent reply other threads:[~2023-01-03 9:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-31 15:05 Tanmay Bhushan
2023-01-02 15:01 ` David Sterba
2023-01-03 9:15 ` Anand Jain [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6ab14932-4b97-021c-4373-9a1aed86ac71@oracle.com \
--to=anand.jain@oracle.com \
--cc=007047221b@gmail.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®