diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c index 1912abf6d02075cb2e21aff34c37d957fb75deda..44d8177eeffcedf126b1e6af5e159ef1710dd075 100644 --- a/fs/btrfs/zoned.c +++ b/fs/btrfs/zoned.c @@ -134,7 +134,8 @@ static int sb_write_pointer(struct block_device *bdev, struct blk_zone *zones, super[i] = page_address(page[i]); } - if (super[0]->generation > super[1]->generation) + if (btrfs_super_generation(super[0]) > + btrfs_super_generation(super[1])) sector = zones[1].start; else sector = zones[0].start;