From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs: make sure btrfs_io_context::fs_info is always initialized
Date: Thu, 23 Sep 2021 23:12:37 +0200 [thread overview]
Message-ID: <20210923211237.GZ9286@twin.jikos.cz> (raw)
In-Reply-To: <20210923060009.53821-1-wqu@suse.com>
On Thu, Sep 23, 2021 at 02:00:08PM +0800, Qu Wenruo wrote:
> Currently btrfs_io_context::fs_info is only initialized in
> btrfs_map_block(), but there are call sites like btrfs_map_sblock()
> which calls __btrfs_map_block() directly, leaving bioc::fs_info
> uninitialized (NULL).
>
> Currently this is fine, but later cleanup will rely on bioc::fs_info to
> grab fs_info, and this can be a hidden problem for such usage.
>
> This patch will remove such hidden uninitialized member by always
> assigning bioc::fs_info at alloc_btrfs_io_context().
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
Added to misc-next, thanks.
prev parent reply other threads:[~2021-09-23 21:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-23 6:00 [PATCH 1/2] btrfs: make sure btrfs_io_context::fs_info is always initialized Qu Wenruo
2021-09-23 6:00 ` [PATCH 2/2] btrfs: remove btrfs_raid_bio::fs_info member Qu Wenruo
2021-09-23 8:53 ` Nikolay Borisov
2021-09-23 8:36 ` [PATCH 1/2] btrfs: make sure btrfs_io_context::fs_info is always initialized Nikolay Borisov
2021-09-23 21:12 ` David Sterba [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=20210923211237.GZ9286@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.com \
/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