btrfs: factor out scratching of one regular super block
authorChristoph Hellwig <hch@lst.de>
Mon, 21 Nov 2022 17:47:48 +0000 (18:47 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 Jan 2023 18:46:16 +0000 (19:46 +0100)
commit0e0078f72be81bbb2a02b229fd2cec8ad63e4fb1
treeae530bb87340474a29740f21c6f1e43463d9f9b3
parent09e44868f1e03c7825ca4283256abedc95e249a3
btrfs: factor out scratching of one regular super block

btrfs_scratch_superblocks open codes scratching super block of a
non-zoned super block.  Split the code to read, zero and write the
superblock for regular devices into a separate helper.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
[ update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c