Thread (5 messages) 5 messages, 3 authors, 2021-09-23

Re: [PATCH 1/2] btrfs: make sure btrfs_io_context::fs_info is always initialized

From: David Sterba <hidden>
Date: 2021-09-23 21:12:55

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 <redacted>
Added to misc-next, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help