btrfs: zoned: fix missing endianness conversion in sb_write_pointer
authorChristoph Hellwig <hch@lst.de>
Tue, 15 Nov 2022 09:39:44 +0000 (10:39 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Nov 2022 13:40:40 +0000 (14:40 +0100)
commitc51f0e6a1254b3ac2d308e1c6fd8fb936992b455
tree03b9601997fca4fff9f0ad47e525a25cacb59132
parent013c1c5585ebcfb19c88efe79063d0463b1b6159
btrfs: zoned: fix missing endianness conversion in sb_write_pointer

generation is an on-disk __le64 value, so use btrfs_super_generation to
convert it to host endian before comparing it.

Fixes: 12659251ca5d ("btrfs: implement log-structured superblock for ZONED mode")
CC: stable@vger.kernel.org # 5.15+
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c