]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: zoned: initialize device's zone info for seeding
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Fri, 4 Nov 2022 14:12:34 +0000 (07:12 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 7 Nov 2022 13:35:24 +0000 (14:35 +0100)
commit8a193d97e828596dde129d557568b4a1858bb525
tree29d2d8dc1db8aa22e0905e9ad861c6477e4402e7
parent3924a91480c7437224b10ad2f42bf02f21c67c39
btrfs: zoned: initialize device's zone info for seeding

When performing seeding on a zoned filesystem it is necessary to
initialize each zoned device's btrfs_zoned_device_info structure,
otherwise mounting the filesystem will cause a NULL pointer dereference.

This was uncovered by fstests' testcase btrfs/163.

CC: stable@vger.kernel.org # 5.15+
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h